FolderTile
Animated folder button showing a fanned preview of up to three materials, an
opening flap, selected styling, and an optional hover action slot.
Visual state is derived from materials unless state is set; the folder
leans open on hover (openOnHover) or when forced open as a drop target
(open). All motion collapses to instant under reduced-motion preferences.
Usage
Best practices
Only the first three
materialsrender in the fan; passitemCountwhen the real total differs, otherwise the count showsmaterials.length.Supply
renderImagein Next.js so previews go throughnext/image- the default renders plain<img>from each material'ssrc/alt.Drive drag-and-drop drop-target styling with
open(forces the open look without revealing the action); useselected+showSelectedStatefor selection, not manual classes.FolderTileis itself the button - passname/onClickand button props directly; don't wrap it in another<button>/<a>.
Props
Also exports
- component
FolderTileEditIcon - type
FolderTileImageProps - interface
FolderTileMaterial - interface
FolderTileProps - type
FolderTileState