vue-metro-tile
Preview
View Demo
The demo is empowered by
vue-metro-tile
&vue-grid-layout
Vue Metro Tile is a Vue component for building Windows 10 like metro layout in modern browser. The component currently got the following features:
- Customized tile content
- 3D tile rotation
- Glare effect when hovering or clicking
- Tilt effect when mouse holds down
Install
npm install vue-metro-tile --save
or
yarn add vue-metro-tile
Import
support both cjs and umd
;
or
<script src="/path/to/vue-metro-tile.umd.min.js"></script>
Usage
A blue metro tile with simple texts on 4 faces
front back top bottom
Props
// style object for all 6 faces// this prop has a lower priority than specific face stylefaceStyle?: object; // style object for front facefrontStyle?: object; // style object for back facebackStyle?: object; // style object for left faceleftStyle?: object; // style object for right facerightStyle?: object; // style object for top facetopStyle?: object; // style object for bottom facebottomStyle?: object; // the width of square prism in pxwidth?: number = 200; // the height of square prism in pxheight?: number = 200; // the rotation along X axis in degreerotateX?: number = 0; // the perspective of square prism container in pxperspective?: number = 750; // the max tilt angle in degree along the X axismaxTiltX?: number = 20; // the max tilt angle in degree along the Y axismaxTiltY?: number = 10; // the initial glare size when clicking clickGlareSize?: number = 90; // the glare opacity when clickingclickGlareOpacity?: number = 015; // the glare opacity when hoveringhoverGlareOpacity?: number = 03;
Slots
front
back
left
right
top
bottom
Events
click
touchmove
Browser compatibility
![]() Edge |
![]() Firefox |
![]() Chrome |
![]() Safari |
![]() Opera |
---|---|---|---|---|
latest | latest | latest | latest | latest |
Some older versions may be supported as well
License
MIT