Display

Folder

A folder that looks like one: a frosted front with papers behind it, tipping open as you point at it or move to it with the keyboard. For file browsers and anywhere things are grouped.

Installation

npx sinaui add folder

Examples

Basic

Point at it, or tab to it, and it tips open.

<script lang="ts">
	import Folder from '#lib/ui/Folder.svelte';
</script>

<Folder name="Manuscripts" count={214} />

Your own color

Any color; the back is a shade darker and the front lets the papers show through.

<script lang="ts">
	import Folder from '#lib/ui/Folder.svelte';
</script>

<Folder name="Star tables" count={38} color="#3b82f6" />

Empty

A count of zero still says so: 0 items.

<script lang="ts">
	import Folder from '#lib/ui/Folder.svelte';
</script>

<Folder name="Archive" count={0} color="#64748b" />

Small

For lists and sidebars.

<script lang="ts">
	import Folder from '#lib/ui/Folder.svelte';
</script>

<Folder name="Letters" size="sm" color="#f43f5e" />

Large

For a grid of folders.

<script lang="ts">
	import Folder from '#lib/ui/Folder.svelte';
</script>

<Folder name="Translations" size="lg" count={91} color="#f59e0b" />

Props

PropTypeDefault
namestringrequired
countnumber, items inside
colorany CSS colorthe accent
size'sm' | 'md' | 'lg''md'
openboolean: held open, while something is dragged over itfalse
selectedbooleanfalse

It's a button: add onclick, ondblclick or any other attribute.

Accessibility

  • A button named by the folder's name, with its item count read after.
  • It opens on keyboard focus just as on hover.
  • With reduced motion it opens without moving.
Introduction
Theming
Changelog
Button
Action button
Confirm button
Copy button
Hold to confirm
Split button
Calendar
Checkbox
Color picker
Combobox
Date picker
Date range picker
File drop
Form
Input
Mention input
Multi select
Number field
OTP input
Password input
Phone input
Radio cards
Radio group
Rich text editor
Search field
Segmented control
Select
Signature pad
Slider
Switch
Tag input
Upload
Wheel picker
Textarea
Time field
Toggle group
Toolbar
Alert dialog
Command palette
Context menu
Dialog
Drawer
Dropdown
Hover card
Popover
Tooltip
Announcement bar
Alert
Empty state
Meter
Progress
Rolling number
Skeleton
Spinner
Toast
Avatar
Avatar group
Badge
Card
Carousel
Chart
Chat
Code block
Data table
Folder
Kbd
Mind map
Resizable panels
Scroll area
Separator
Sortable
Table
Tag group
Virtual list
Audio player
Image
Image compare
Video
Visualizer
Breadcrumb
File tree
Menubar
Navigation menu
Pagination
Sidebar layout
Stepper
Tabs
Alarm clock
Clock
Dynamic island
Fluid orb
Hourglass
Stopwatch
Timer
AI chat
AI media
Auth
Board
Booking
Dashboard
File explorer
Messaging
Notifications
Settings
Team
Overview
Pricing
Agent chat
Calendar
Voice agent
Mail inbox
CMS
Blog
Marketing site
E-commerce
AI agents
SaaS landing page
SaaS app
Accordion
Dark theme
Light theme