Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

Data Display

Folder

Data Display

Folder React component for Tailwind CSS v4

File managerGantt
Live props
Appearance
color
backColor
flapColor
cardColor
size
spread1
Content
label
Behavior
closeOnLeave
State
defaultOpen
Code
import { Folder } from "@/components/ui/folder-component"

<Folder />
  1. Home
  2. Components
  3. Data Display
  4. Folder
Free

Folder React component for Tailwind CSS v4

v1.0.1·Updated in 1.2.1

A React animated folder icon whose cards fan out on hover and lift open on click, behind a 3D-tilted glass flap.

Hover (or tab to it) to fan the three cards out of the folder while the flap tips back, then click, tap, Enter or Space to lift the folder open and send the cards up in a spread. Click again, press Escape, or move the pointer away to drop everything back in.

Folder is a free React component in the React data display components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add folder-component, together with UIProvider and the npm package motion.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup

npx wingo-ui@latest add folder-component

Usage

Import Folder from @/components/ui/folder-component.

import { Folder } from "@/components/ui/folder-component"

export function Demo() {
  return (
    <div className="h-96">
      <Folder label="Design files" />
    </div>
  )
}

// put your own previews on the cards, back to front:
// <Folder color="blue" cards={[<img src="/a.jpg" alt="" />, <img src="/b.jpg" alt="" />, <img src="/c.jpg" alt="" />]} />

Props

  • colordefault "auto"
    "auto" | "black" | "white" | "blue"

    Color theme of the folder, flap, and cards. Auto is white on light pages and black on dark ones, switched in CSS with the dark class so it never flashes; the others stay fixed in both themes.

  • backColordefault ""
    string

    Any CSS color for the back panel, over the chosen color theme.

  • flapColordefault ""
    string

    Any CSS color for the frosted front flap (it keeps the theme's glass opacity); its outline follows as a lighter shade.

  • cardColordefault ""
    string

    Any CSS color for the three cards; their outline follows as a darker shade.

  • sizedefault "md"
    "sm" | "md" | "lg"

    Overall scale of the folder. Maps to 0.65x (sm), 1x (md), and 1.35x (lg) of the 321 x 270 px base, and carries the cards and flap with it.

  • spreaddefault 1
    number

    How wide the cards fan out: 1 is the original, 0 stacks them straight, 1.5 fans them further. Scales the sideways offsets and tilts, not the lift.

  • labeldefault "Folder"
    string

    Accessible name of the folder button, e.g. the name of the folder.

  • closeOnLeavedefault true
    boolean

    Drops the cards back in when the pointer leaves or focus moves away. Turn it off to keep the folder open until it is clicked again.

  • defaultOpendefault false
    boolean

    Starts open when uncontrolled. Ignored when open is set.

  • open
    boolean

    Controlled open state. Pass it with onOpenChange to drive the folder yourself.

  • onOpenChange
    (open: boolean) => void

    Called with the next open state on click, Escape, pointer leave or blur.

  • cards
    ReactNode[]

    Content for the three cards, back to front, each filling a 158 x 208 px rounded card (before scaling). Leave it out for the default document lines; an image or a short preview works well.

  • className
    string

    Extra classes for the root, which fills its parent and centers the folder. Any other div prop is spread onto it too.

Parts

  • FolderColor

    type

    The color themes: "auto" (white on light pages, black on dark ones) | "black" | "white" | "blue".

Examples

Photo album

cards takes your own previews, back to front; here three photos in the blue theme.

Controlled

open and onOpenChange drive it from a button; closeOnLeave off keeps the files out until you close it.

Empty state

The small size with a narrow spread above an empty-state message and an upload action.

Dependencies

motionui-config

Files

  • components/ui/folder-component.tsx

FAQ

Is the React Folder component free?

Yes. The source is free and needs no account: copy it from the Code tab or install it with the CLI.

How do I install Folder?

Run npx wingo-ui@latest add folder-component. It also adds the Wingo UI item it builds on (UIProvider) and the npm package motion. With shadcn, run npx shadcn@latest add https://wingo-ui.com/r/folder-component.json.

See also

File managerFile ListEmpty StateFile UploadGrid Reveal

More React data display components

GanttJSON ViewerLog ViewerMarkdownPresenceScheduler
All 23 React data display components
PreviousFile managerNext Gantt