More components in Pro
Galleries, cards and interactive pieces for pages that need more than the basics.
items | FolderItem[] | Three sample documents | What the folder holds, up to 6. Each item can be a string, { title, description }, { image, title, alt }, { content } or a React element. |
children | ReactNode | undefined | Your own items as children. Each child becomes one page in the folder. |
mode | 'flap' | 'book' | 'flap' | flap stands the folder up and drops the front flap open. book lays it flat and swings the cover over like a book. |
variant | 'solid' | 'glass' | 'matte' | 'solid' | Material of the folder. glass turns the front into refracting glass that shows the pages inside. |
layout | 'spread' | 'stack' | 'row' | 'spread' | How the items are laid out once the folder is open. |
color | '#3d8bff' | Color of the folder. Shades are derived from it. | |
paperColor | '#ffffff' | Color of the pages. | |
label | undefined | Text on the tab. The tab grows to fit it. | |
tabPosition | 'left' | 'center' | 'right' | 'right' | Where the tab sits along the top edge. |
openOn | 'click' | 'hover' | 'click' | Opens the folder on click, or while the cursor is over it. |
open | undefined | Controls the folder from outside. Leave it out to let the folder manage itself. | |
defaultOpen | Starts the folder open. | ||
onOpenChange | (open: boolean) => void | undefined | Called when the folder opens or closes. |
onItemClick | (item, index: number) => void | undefined | Called when an item is clicked while the folder is open or after it was dragged out. |
onItemDrop | (item, index: number, inside: boolean) => void | undefined | Called when a dragged item is let go, with whether it landed back in the folder. |
draggable | Lets people drag items out of the folder, leave them anywhere and drop them back in. | ||
zoomOnClick | Clicking an item brings it up close. Click it again, press Escape or click away to put it back. | ||
peek | Teases the items out on hover. In flap mode the page under the cursor rises highest. | ||
| Plays an entrance when the folder scrolls into view: the pages drop in and the folder closes over them. | |||
size | Scale of the whole folder. | ||
frost | 0.25 | How much the glass front blurs what is behind it, from 0 for clear glass to 1. Used by the glass variant. | |
tilt | 0.5 | How much the folder tilts toward the cursor, from 0 to 1.5. | |
speed | Speed of every animation. | ||
bounce | 0.4 | How much the flap, cover and pages overshoot as they settle, from 0 to 1. | |
closeOnOutsideClick | Closes the folder on a click outside it or on Escape. | ||
theme | 'dark' | 'light' | 'dark' | Tunes the shadows for dark or light pages. |
| Extra class names for the container. | |||
undefined | Inline styles for the container. |
itemsFolderItem[]What the folder holds, up to 6. Each item can be a string, { title, description }, { image, title, alt }, { content } or a React element.
Three sample documentschildrenReactNodeYour own items as children. Each child becomes one page in the folder.
undefinedmode'flap' | 'book'flap stands the folder up and drops the front flap open. book lays it flat and swings the cover over like a book.
'flap'variant'solid' | 'glass' | 'matte'Material of the folder. glass turns the front into refracting glass that shows the pages inside.
'solid'layout'spread' | 'stack' | 'row'How the items are laid out once the folder is open.
'spread'colorstringColor of the folder. Shades are derived from it.
'#3d8bff'paperColorstringColor of the pages.
'#ffffff'labelstringText on the tab. The tab grows to fit it.
undefinedtabPosition'left' | 'center' | 'right'Where the tab sits along the top edge.
'right'openOn'click' | 'hover'Opens the folder on click, or while the cursor is over it.
'click'openbooleanControls the folder from outside. Leave it out to let the folder manage itself.
undefineddefaultOpenbooleanStarts the folder open.
onOpenChange(open: boolean) => voidCalled when the folder opens or closes.
undefinedonItemClick(item, index: number) => voidCalled when an item is clicked while the folder is open or after it was dragged out.
undefinedonItemDrop(item, index: number, inside: boolean) => voidCalled when a dragged item is let go, with whether it landed back in the folder.
undefineddraggablebooleanLets people drag items out of the folder, leave them anywhere and drop them back in.
zoomOnClickbooleanClicking an item brings it up close. Click it again, press Escape or click away to put it back.
peekbooleanTeases the items out on hover. In flap mode the page under the cursor rises highest.
introbooleanPlays an entrance when the folder scrolls into view: the pages drop in and the folder closes over them.
sizenumberScale of the whole folder.
frostnumberHow much the glass front blurs what is behind it, from 0 for clear glass to 1. Used by the glass variant.
0.25tiltnumberHow much the folder tilts toward the cursor, from 0 to 1.5.
0.5speednumberSpeed of every animation.
bouncenumberHow much the flap, cover and pages overshoot as they settle, from 0 to 1.
0.4closeOnOutsideClickbooleanCloses the folder on a click outside it or on Escape.
theme'dark' | 'light'Tunes the shadows for dark or light pages.
'dark'Extra class names for the container.
Inline styles for the container.
undefined


