Black Friday: 30% off Pro

Get 30% off

Updated

Folder Peek

Preview

Customize

Color
Rise44px
Fan7°
Tilt22°
Max rows5

Installation

npx shadcn@latest add https://uibrik.com/r/folder-peek.json
Adds the files to components/uibrik/folder-peek and installs @tabler/icons-react and motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/folder-peek.

Usage

import { FolderPeek } from "@/components/uibrik/folder-peek/folder-peek";​const files = [  { name: "Brand guidelines.pdf", meta: "2.4 MB" },  { name: "Q3 roadmap.key", meta: "8.1 MB" },  // …2 more];​<FolderPeek  name="Launch assets"  color="#a1a1aa"  rise={44}  fan={7}  tilt={22}  parallax  droppable  maxRows={5}  files={files}  onSelect={(file, index) => {}}  onAdd={(files) => {}}/>

Where to use Folder Peek

  • File managers

    Previews that rise and fan out on hover show what is inside a folder without opening it.

    Pairs with File Card

  • Grouped documents

    A folder that flies its files out into a list suits landing pages for document products.

  • Upload targets

    Taking files dropped onto it makes the folder a clear drag-and-drop destination.

    Pairs with File Dropzone

Props

FolderPeek
name
Type string
"Launch assets"
Folder name, under the folder and atop the list.
color
Type string
"#a1a1aa"
Folder colour. The back is drawn a shade darker, the flap a shade lighter.
rise
Type number
44
How far the sheets rise on hover.
fan
Type number
7
How far the outer sheets turn as they fan.
tilt
Type number
22
How far the front flap tips forward on hover.
parallax
Type boolean
true
Lean the fanned sheets toward the cursor.
droppable
Type boolean
true
Accept files dropped on the folder or the open list.
maxRows
Type number
5
Rows the open list shows before it scrolls.
files
Type { name: string; meta?: string; kind?: "doc" | "slides" | "image" | "text"; preview?: string }[]
4 sample files
Files on mount, newest first. The first three are drawn as sheets, previewed by kind (inferred from the extension); `preview` swaps the drawn preview for your own image.
onSelect
Type (file, index) => void
–
Called when a row in the open list is picked.
onAdd
Type (files) => void
–
Called with files dropped in from the desktop, or dragged with the application/x-folder-file type.
className
Type string
–
Classes for the wrapper.