Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Collections

  • QuestionCard
  • Table
  • Book3D
  • ProTable
  • PricingTable
  • JsonViewer
  • EditableTable
  • List
  • Descriptions
  • RowActions
  • Tree
  • Card
  • Carousel
  • Video
  • Audio
  • BentoGrid
  • Image
  • MagicCard
  • AnimatedList
  • Marquee
  • Sortable
  • Kanban
  • DesignCanvas
  • LayerTree
  • StageDraw
  • SlideDeck
  • PresenterView
  • ComponentPicker
  • EventStream
  • QueueLane
  • DocumentSheet
  • Novel reader
  • Scheduler
  • Org classroom
  • Danmaku
  • LiveChat
  • LivePlayer
  • LogViewer
  • FileTree
  • CodeReviewThread
  • VirtualList
  • InfiniteScroll
  • LogoLoop
  • BounceCards
  • CardSwap
  • ChromaGrid
  • CircularGallery
  • DomeGallery
  • FlyingPosters
  • InfiniteMenu
  • MagicBento
  • ScrollStack
  • ProfileCard
  • TiltedCard
  • PixelCard
  • DecayCard
  • ReflectiveCard
  • Folder

Charts and Diagrams

  • Flow
  • Diagram
  • Paper
  • SequenceDiagram
  • Sankey
  • Sparkline
  • Funnel
  • Treemap
  • Gantt
  • Heatmap
  • ContributionGraph
  • Legend
  • Chart
  • WorldMap

Information

  • ImageViewer
  • LiveProductCard
  • DiffStat
  • ScoreRing
  • ScoreScale
  • Badge
  • Dot
  • StatusDot
  • Chip
  • FilterChip
  • Coupon
  • Tag
  • Annotation
  • Avatar
  • AvatarCircles
  • User
  • QRCode
  • Comment
  • RelativeTime
  • GitCommit
  • DeployStatus
  • ShieldBadge
  • AwardBadge
  • CreditCard
  • IconTile

Metrics

  • Stat
  • Statistic
  • Meter
  • Timeline
  • NumberTicker

Placeholders

  • Empty
  • Skeleton
  • Watermark

Folder

folder

Opens a layered 3D folder and fans out its paper contents.

Usage

Basic usage

Click on the folder to expand/collapse, and the paper will spread out in a fan shape. After unfolding, the paper will magnetically follow the mouse.

tsx
<Folder />

Paper with content

items Up to 3 sheets of paper (excessive truncation, insufficient filling), each unfolded to carry the content.

tsx
<Folder
  size={1.4}
  items={[
    <span key="1" className="flex h-full w-full items-center justify-center text-[8px] text-foreground">Document</span>,
    <span key="2" className="flex h-full w-full items-center justify-center text-[8px] text-foreground">Picture</span>,
    <span key="3" className="flex h-full w-full items-center justify-center text-[8px] text-foreground">Video</span>,
  ]}
/>

Customize body color

color Feed any CSS color (token is recommended), defaultOpen lets the folder expand initially.

tsx
<Folder color="var(--color-chart-4)" defaultOpen size={1.2} />

Turn off magnetic suction

disableMagnet is expanded, the paper will no longer shift with the mouse, and only hover magnification will be retained.

tsx
<Folder size={1.4} disableMagnet defaultOpen />

When to use

Use Folder as a playful expandable entry for a portfolio or file group. It opens up to three paper layers and applies magnetic pointer movement. Use FileTree or Tree for real hierarchical file navigation, or Table for tabular data.

Import

ts
import { Folder } from "@hulianui/ui"

Props

Inherits <div> attributes except color and onClick, which are redefined below.

NameTypeDefaultDescription
colorstringvar(--color-primary)Folder color. Accepts any CSS color; a theme token is recommended.
sizenumber1Scale relative to the 100 by 80 px base.
openboolean-Controlled open state; pair with onOpenChange.
defaultOpenbooleanfalseInitial state in uncontrolled mode.
disableMagnetbooleanfalsePrevents open papers from following the pointer.

Events

EventTypeDescription
onClickMouseEventHandler<HTMLButtonElement>Called when clicking the folder to toggle it.
onOpenChange(open: boolean) => voidCalled for open-state changes in both modes.

Slots

SlotTypeDescription
itemsReactNode[]Up to three paper contents. Extras are truncated and missing entries become blank papers.

Usage notes

  • Only three items can render; extras are truncated and short arrays are padded.
  • Controlled usage requires both open and onOpenChange or clicks cannot update state.
  • Use full --color- token names; bare var(--primary) does not resolve.
  • [[nextjs-app-router-underscore-private-folder-404]] concerns Next.js private route folders and does not apply to this component.

Related

Table · Book3D · ProTable · PricingTable · JsonViewer · EditableTable

Playground

<Folder
  size={1}
  color="var(--color-primary)"
  disableMagnet={false}
  items={[<DocIcon />, <ImgIcon />, <VideoIcon />]}
/>
PreviousReflectiveCardData DisplayNextRouteTabs

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Events
    • Slots
    • Usage notes
    • Related
  • Playground