Components
Limer's 64 Svelte components, themed with Tailwind. Pick a theme in the top bar: every component follows it.
pnpm add @limerdev/zest Actions
7A button, or a link styled as one when it has href. loading shows a spinner while the action it started runs: the button keeps focus, is marked busy and ignores clicks.
Buttons joined into one control. <ButtonGroup.Root> (orientation: horizontal or vertical) holds Buttons, triggers, an Input, a ButtonGroup.Text (a label or unit in a box) and ButtonGroup.Separators, and joins them: square inner corners, one border between neighbours. It is a group; name it with aria-label. Groups inside a group keep a gap.
A menu opened by right-clicking (or long-pressing) an area: <ContextMenu.Root> holds a ContextMenu.Trigger (the area) and a ContextMenu.Content at the pointer. It takes the same items as DropdownMenu: Item (variant="error", Shortcut), CheckboxItem, RadioGroup with RadioItems, Group with GroupHeading, Label, Separator and submenus. Arrow keys move, Enter chooses, Escape closes.
A menu of actions or options opened from a button: <DropdownMenu.Root> holds a DropdownMenu.Trigger and a DropdownMenu.Content of DropdownMenu.Items (onSelect, variant="error", DropdownMenu.Shortcut for a key hint). It also takes CheckboxItems, a RadioGroup of RadioItems, Groups with a GroupHeading, Labels, Separators and submenus (Sub, SubTrigger, SubContent). Arrow keys move, Enter or Space chooses, typing jumps to an item, Escape closes and returns focus.
A button that stays pressed until pressed again (bind:pressed), announced as pressed or not. variant (default, outline) and size (sm, default, lg) as for buttons.
A set of joined toggles: <ToggleGroup.Root> (type="single" or "multiple", bind:value, variant, size) holds ToggleGroup.Items (value). Arrow keys move between items; Space or Enter presses one. Name the group with aria-label.
A row of controls with one Tab stop, moved through with arrow keys: <Toolbar.Root> holds Toolbar.Buttons, Toolbar.Links and Toolbar.Groups (type="single" or "multiple", bind:value) of Toolbar.GroupItems. A vertical Separator divides sections. Name it with aria-label.
Data input
24A month calendar to pick a date: type="single" binds a DateValue (a CalendarDate from @limerdev/zest/date, all of @internationalized/date), type="multiple" a DateValue[]. minValue, maxValue, isDateDisabled, isDateUnavailable, numberOfMonths, weekStartsOn, locale. With no children it draws the header and month grids; the parts (Header, Heading, PrevButton, NextButton, Months, Grid, GridHead, GridBody, GridRow, HeadCell, Cell, Day) are there for custom layouts. Arrow keys move between days, Page Up and Down between months, Enter or Space picks.
A checkbox with bind:checked, and bind:indeterminate for a partly checked group. With name it submits with a form. Inside a Field it takes its id, label, description, error and disabled state from the Field; use orientation="horizontal" to put the label beside it.
A text input with a list of options, filtered as the user types: <Combobox.Root> (type="single" or "multiple", bind:value, items, name) holds a Combobox.Input (styled like Input, with a button that opens the list) and a Combobox.Content. Given items, <Combobox.Content /> draws those whose label contains the typed text, or emptyText when none do. For your own filtering (a search on the server, say) or markup, give the content Combobox.Items (value, label), optionally in Combobox.Groups with a Combobox.GroupHeading, and read the typed text from the input's oninput. Arrow keys move, Enter chooses, Escape closes. Inside a Field the input is labelled, described and marked invalid by the Field.
A date typed segment by segment, in the order and format of the locale: <DateField.Root> (bind:value a DateValue, granularity to add the time, minValue, maxValue, name) holds a DateField.Label (which names the field; use it instead of Field.Label) and a DateField.Input, which draws its segments. Type digits or use the arrow keys in a segment; Tab or the separator moves on. Inside a Field, its Field.Description and Field.Error describe the field.
A date typed segment by segment or picked from a calendar in a popover: <DatePicker.Root> (bind:value a DateValue, bind:open, minValue, maxValue, isDateUnavailable, granularity, name) holds a DatePicker.Label (which names it; use it instead of Field.Label), a DatePicker.Input (its segments and a button that opens the calendar) and a DatePicker.Content (the popover, which draws a DatePicker.Calendar). The calendar's parts are named like Calendar's for custom layouts. Inside a Field, its description and error describe it.
A period typed as two dates, segment by segment: <DateRangeField.Root> (bind:value a { start, end } of DateValues, granularity, minValue, maxValue) holds a DateRangeField.Label (which names both dates; use it instead of Field.Label) and DateRangeField.Inputs, one box that draws the start and end DateRangeField.Inputs (type="start", "end"). Inside a Field, its description and error describe the inputs.
A period typed as two dates or picked from a calendar in a popover: <DateRangePicker.Root> (bind:value a { start, end } of DateValues, bind:open, minDays, maxDays, minValue, maxValue, numberOfMonths) holds a DateRangePicker.Label (which names it; use it instead of Field.Label), DateRangePicker.Inputs (one box with the start and end inputs and the calendar button) and a DateRangePicker.Content (the popover, which draws a range calendar). Inside a Field, its description and error describe it.
A form field: Field holds a Field.Label, one control (Input …) and an optional Field.Description and Field.Error. It wires them for you: the label points at the control, the description and a shown error describe it, and a shown error (or invalid) marks it aria-invalid. disabled disables the control. Field.Set with a Field.Legend groups related fields; Field.Group stacks fields; orientation puts the label beside the control.
Picks files: <FileDropzone> with bind:files (a File[]) takes files dropped on it or chosen by browsing (a click, or Enter or Space on its focused input). It turns away files that don't match accept, are larger than maxSize or exceed maxFiles, and says why; onReject hears it too. Chosen files are listed with a remove button, and with a bar for those in progress (a Map of file to 0–1). The app does the upload; with name, a form posts the chosen files. Inside a Field it takes its id, label, description, error and invalid and disabled state from the Field.
A text input (type text, email, number, password, search, date, file …) with bind:value, or bind:files for type="file". Inside a Field it takes its id, label, description, error and invalid and disabled state from the Field.
A text field with addons inside its box: an icon, a unit or prefix, a button. <InputGroup.Root> holds one control, an InputGroup.Input or InputGroup.Textarea (in a Field, labelled and described by it), and InputGroup.Addons (align: inline-start, inline-end, block-start, block-end) holding icons, InputGroup.Text or InputGroup.Buttons. The group draws the box, its focus ring and its invalid state; clicking an addon's text focuses the control.
A label for a form control: clicking it focuses or toggles the control.
The browser's own <select>, styled as a Zest field: <NativeSelect.Root> with bind:value, and its options given as items or as NativeSelect.Options (grouped in NativeSelect.OptGroups). placeholder adds an empty first option. Inside a Field it takes its id, label, description, error and invalid and disabled state from the Field.
A number field: <NumberInput> with bind:value (a number, or null when empty). It shows and reads numbers in the locale's way (sv-SE writes 1 234,5) with formatOptions (Intl.NumberFormat: currency, percent, decimals), keeps the value within min and max, and steps by step with the arrow keys and its buttons, by largeStep with Page Up and Page Down, and to min and max with Home and End. It is a WAI-ARIA spinbutton. With name, the form posts the plain number. Inside a Field it takes its id, label, description, error and invalid and disabled state from the Field.
A code typed into separate boxes, as one input underneath: <PinInput.Root> (maxlength, bind:value, pattern, onComplete) draws its boxes in one row. To group them, its children snippet gets the cells, each drawn as a PinInput.Cell; PinInput.Group joins cells into one row and PinInput.Separator puts a dash between groups. Typing moves on, Backspace moves back, pasting fills all boxes, and password managers and one-time-code autofill work. Inside a Field the input is labelled, described and marked invalid by the Field.
A set of radio buttons with bind:value: <RadioGroup.Root> holds one RadioGroup.Item per option. Tab enters the group, arrow keys move and select. Put each item in a Field orientation="horizontal" with a Field.Label, and the group in a Field.Set with a Field.Legend that names it.
A month calendar to pick a range of dates: bind:value is { start, end } of DateValues (from @limerdev/zest). The first click sets the start, the second the end; the days between are highlighted. minDays, maxDays, minValue, maxValue, isDateUnavailable, numberOfMonths. With no children it draws the header and month grids; its parts are named like Calendar's for custom layouts.
A rating out of max stars (5 by default), announced as a slider: <RatingGroup.Root> (bind:value, allowHalf, readonly, name) draws its stars when it has no children; for custom ones, render RatingGroup.Items (index) from the children snippet's items; each item's own children snippet gets its state. Arrow keys change the rating, Home and End go to the ends. Inside a Field it is named by Field.Label; outside one, give it aria-label.
A choice from a list: <Select.Root> (type="single" or "multiple", bind:value, name for forms, items) holds a Select.Trigger (placeholder) and a Select.Content. Given items, the parts need no children: the trigger shows the chosen label and the content draws an item for each. For custom markup, give the trigger a Select.Value and the content Select.Items. Items can be grouped (Select.Group with Select.GroupHeading) and divided (Select.Separator). Arrow keys move, Enter chooses, typing jumps to a match. Inside a Field the trigger is labelled, described and marked invalid by the Field.
A value picked by dragging a thumb along a track, or with the arrow keys (Page Up and Down for big steps, Home and End for the ends): type="single" binds a number, type="multiple" a number[] with one thumb each (a range). min, max, step, orientation. Inside a Field the thumbs are named by Field.Label and described by its description and error; outside one, give each thumb a name with aria-label.
An on/off switch with bind:checked, for a setting that applies at once. With name it submits with a form. Inside a Field it takes its id, label, description, error and disabled state from the Field; use orientation="horizontal" to put the label beside it.
A multi-line text input with bind:value that grows with its text. Inside a Field it takes its id, label, description, error and disabled state from the Field.
A time of day typed segment by segment, in the locale's format: <TimeField.Root> (bind:value a Time from @limerdev/zest, granularity hour, minute or second, hourCycle 12 or 24, minValue, maxValue, name) holds a TimeField.Label (which names the field; use it instead of Field.Label) and a TimeField.Input, which draws its segments. Type digits or use the arrow keys. Inside a Field, its Field.Description and Field.Error describe the field.
A span of time typed as two times, segment by segment: <TimeRangeField.Root> (bind:value a { start, end } of Times, granularity, hourCycle) holds a TimeRangeField.Label (which names it; use it instead of Field.Label) and TimeRangeField.Inputs, one box that draws the start and end TimeRangeField.Inputs. Inside a Field, its description and error describe the inputs.
Overlays
6A dialog that asks for a decision before the user goes on, announced as an alertdialog: <AlertDialog.Root> holds an AlertDialog.Trigger and an AlertDialog.Content with a Header (Title, Description, optional Media icon) and a Footer with an AlertDialog.Cancel and an AlertDialog.Action (both styled as buttons: variant, size). Focus starts inside; a click outside doesn't close it; Escape and Cancel close it. Action does not close it by itself, so it can wait for the work to finish: set its loading while the work runs (a spinner; clicks are ignored) and bind:open to false when done.
A modal window over the page: focus moves into it and stays there, Escape and the close button close it, and focus returns to the trigger. <Dialog.Root> (bind:open) holds a Dialog.Trigger (a button: variant, size) and a Dialog.Content with a Dialog.Header (Dialog.Title, needed, and Dialog.Description) and a Dialog.Footer.
A preview card shown while the pointer rests on a link (openDelay, closeDelay): a person, a project or a document behind it. The link still works as a link. The card is a mouse convenience: keyboard and touch users only get the link.
A panel of extra content or controls anchored to a trigger. Click or Enter opens it, Escape or a click outside closes it, and focus returns to the trigger. Popover.Header, Popover.Title and Popover.Description lay out its text.
A panel that slides in from an edge of the screen, as a modal dialog: <Sheet.Root> (bind:open) holds a Sheet.Trigger (a Button: variant, size) and a Sheet.Content (side: right by default, left, top, bottom) with a Sheet.Header (Sheet.Title, Sheet.Description), the body and a Sheet.Footer of actions, often a Sheet.Close. It is Bits UI's Dialog with Zest's own look: focus moves in and is trapped, Escape and the overlay close it, and focus returns to the trigger.
A short label shown when its trigger is hovered or focused with the keyboard, and announced as the trigger's description. Escape hides it. Put one Tooltip.Provider around the app; each tooltip is a <Tooltip.Root> with a Tooltip.Trigger and a Tooltip.Content.
Navigation
6The trail from the app's top to the page the user is on, each step a link back. Given items ({ label, href }), <Breadcrumb.Root items={…} /> draws it: links, chevrons between them, and the last item as the current page (aria-current="page"). Composed, a Breadcrumb.List holds Breadcrumb.Items (each a Breadcrumb.Link or the Breadcrumb.Current) with a Breadcrumb.Separator between them; Breadcrumb.Ellipsis stands for steps left out of a long trail. The root is a navigation landmark named label ("Breadcrumb").
A searchable list of commands: <Command.Root> holds a Command.Input that filters the Command.Items (value, keywords, onSelect) and Command.LinkItems (href) in a Command.List, grouped with Command.Group (heading) and divided with Command.Separator. Command.Empty shows when nothing matches, Command.Loading while results load, Command.Shortcut a key hint. Arrow keys move, Enter runs. Command.Dialog puts it all in a dialog as a command palette.
A bar of menus, as in a desktop application: <Menubar.Root> holds a Menubar.Menu per menu, each with a Menubar.Trigger and a Menubar.Content. The contents take the same items as DropdownMenu: Item (variant="error", Shortcut), CheckboxItem, RadioGroup with RadioItems, Group with GroupHeading, Label, Separator and submenus. Left and Right move between menus, Down opens one, Escape closes.
A site's or app's main navigation: <NavigationMenu.Root> holds a NavigationMenu.List of NavigationMenu.Items. An item is a NavigationMenu.Link (style it with navigationMenuTriggerStyle() at the top level; active marks the current page) or a NavigationMenu.Trigger with a NavigationMenu.Content panel of links. Panels open on hover or click, in a shared viewport below the bar (viewport={false} places each under its trigger). Arrow keys move along the bar, Escape closes a panel.
Pages of a list: <Pagination.Root> (count, perPage, bind:page, siblingCount) is a navigation landmark (label) that draws previous, the pages (the current one marked, gaps as an ellipsis) and next. The pages are buttons that change page; load the page's data when it changes. To draw it yourself, its children snippet gets the pages: a Pagination.Content list of Pagination.Items, each a Pagination.Page or a Pagination.Ellipsis, between a Pagination.PrevButton and a Pagination.NextButton.
Panels shown one at a time, chosen with tabs: <Tabs.Root> (bind:value, orientation) holds a Tabs.List of Tabs.Triggers and a Tabs.Content per tab, matched by value. Arrow keys move between tabs and show their panel; Tab moves into the panel.
Data display
8Sections that open and close under their headings: <Accordion.Root> (type="single" or "multiple", bind:value) holds Accordion.Items (value), each with an Accordion.Trigger (its heading, level 3 by default) and an Accordion.Content. Enter or Space toggles a section; arrow keys move between headings.
A person's picture or initials: <Avatar.Root> (size sm, default, lg) holds an Avatar.Image (src, alt) and an Avatar.Fallback shown while it loads or when it fails. Avatar.Badge marks a status; Avatar.Group overlaps several, with an Avatar.GroupCount for the rest.
A short label for a status, a category or a count: <Badge> with a variant colour (primary, secondary, neutral, outline, or a status: info, success, warning, error). An icon before the text is sized for it. With the child snippet it renders a link or another element.
Names and their values, the detail view of a record: a <dl>. Given items ({ term, details }), <DescriptionList.Root items={…} /> draws them. Composed, each DescriptionList.Item holds a DescriptionList.Term and its DescriptionList.Details, which can hold anything: a Badge, a link, a Button. orientation: terms beside the values in two aligned columns (horizontal, the default) or above them (vertical).
A row of a list: <Item.Root> (variant: default, outline, muted; size: default, sm) holds an Item.Media (an icon in a tile with variant="icon", a cropped image with variant="image"), an Item.Content with an Item.Title and an Item.Description, and Item.Actions. Item.Group makes a list of items (each one a list item), with Item.Separators between them. A row that opens something: in a group, put the link in its Item.Title, so the row stays a list item; a single row can be the link itself, with the root's child snippet.
A key the user presses, as a small key cap: a <kbd> element. One Kbd per key, side by side for a combination (<Kbd>Ctrl</Kbd><Kbd>K</Kbd>), or the whole combination in one (<Kbd>⌘K</Kbd>). It takes an icon (<Icon> or a Lucide icon) for keys like Enter.
A measurement within a known range: value between min and max (0 and 100 by default), announced as a meter. Name it with aria-label or aria-labelledby, and set aria-valuetext when the number alone doesn't say it ("312 of 400 hours").
A table of data: <Table.Root> (in a container that scrolls sideways when it is too wide) holds a Table.Header, a Table.Body and an optional Table.Footer, each of Table.Rows of Table.Head (column headings) and Table.Cells, and a Table.Caption that names it. Rows highlight on hover; data-state="selected" on a row marks it selected. A Table.Head with sort (ascending, descending or none) is a sort button with aria-sort that calls onSort. It is the native table, so screen readers read it as one; the app sorts, selects and pages the rows.
Feedback
6A message in the page: <Alert.Root> (variant: default, info, success, warning, error) holds an optional icon first, an Alert.Title and an Alert.Description. The text stays readable on a tint of the status colour; the icon takes the colour. warning and error are role="alert", announced when they appear; the others role="status".
What a place shows when it has nothing yet: a list without rows, a search without results, a page the user has no access to. <Empty.Root> centres an Empty.Media (an icon in a tile with variant="icon", or an image; hidden from screen readers), an Empty.Title (a heading, at level 3 by default), an Empty.Description and an Empty.Content with what to do next. Give the root a border (border border-dashed) to mark out an area.
A bar showing how far a task has come: value out of max (100 by default), announced as a progressbar. With no value (or null) it shows that the task is running without knowing how far. Name it with aria-label or aria-labelledby.
A placeholder shaped like content that is loading: <Skeleton> is a pulsing block, sized and shaped with classes (h-4 w-40, size-10 rounded-full). It is hidden from assistive technology: mark the region that is loading aria-busy="true", and give it a name or a status text. The pulse stops with reduced motion.
A turning circle for a wait of unknown length. It is a status region named by label ("Loading" by default), so a screen reader announces it when it appears. It is 16px and takes the text colour; class sizes and colours it (size-6 text-muted). It stops turning with reduced motion.
A short message that appears at the edge of the screen and closes by itself: put one <Toaster> in the app's root layout (position, label, closeLabel), then call toast('Saved') from anywhere in the browser. toast.success, toast.info, toast.warning and toast.error set the variant and its icon; options add a description, an action button (Undo), a duration (5 s; an error stays until closed) or an id to update a toast in place. toast.dismiss(id) closes one, toast.dismiss() all. Screen readers hear each toast once (an error as an alert). The timers pause while the pointer is over the toasts or focus is in them; F8 moves focus to them and back, and Escape closes the focused one.
Layout
7Keeps its content at a width-to-height ratio (16 / 9, 1, 4 / 3) as its width changes, so images and embeds don't shift the page while they load.
A surface that groups related content: <Card.Root> holds an optional Card.Figure (an image that runs to the edges; inset pads it), a Card.Header (a Card.Title heading, at level 3 by default; a Card.Description; a Card.Action in the end corner), a Card.Content and a Card.Footer. variant: default (border and shadow), outline, dash (an empty or drop area), soft (a fill, no border). size: sm, default, lg (padding, gaps and title). layout: the figure above or below the text (vertical), beside it (horizontal, or responsive from the md breakpoint), or behind it with a scrim (overlay); beside or behind, the text goes in a Card.Body.
One section that opens and closes: <Collapsible.Root> (bind:open) holds a Collapsible.Trigger (a button; render your own with the child snippet) and a Collapsible.Content, which slides open.
App-wide defaults for every component inside it, set once in the root layout instead of at each call site: the locale of the calendars, date fields, NumberInput and FileDropzone (defaultLocale), where floating parts portal to (defaultPortalTo), the reading direction (dir), and strings, the text Zest shows and reads out that isn't the app's content (close buttons, landmark names, "No results found."). Unset strings stay English. A Config inside another overrides only what it sets, and a component's own prop (closeLabel) wins over both.
A scrollable box with slim scrollbars that match the theme: give it a height (or width) and orientation (vertical, horizontal, both). It scrolls with the wheel, touch and keyboard like any scrolling box. ScrollArea.Scrollbar is there for custom layouts.
A line between groups of content: horizontal by default, orientation="vertical" between items in a row. Screen readers announce it as a separator; decorative hides it from them.
An app's layout with a navigation panel: <Sidebar.Root> (bind:open, collapsible: offcanvas by default, icon or none) holds a Sidebar.Panel and a Sidebar.Inset (the page, main), where a Sidebar.Trigger shows and hides the panel. The panel has a Sidebar.Header, a Sidebar.Content (a navigation landmark, label) of Sidebar.Groups, each named by a Sidebar.GroupLabel and holding a Sidebar.Menu of Sidebar.MenuItems, and a Sidebar.Footer. A Sidebar.MenuButton is a link with href (a button without); active marks the current page, which the app passes from its router; its text goes in a <span>, hidden but still read when the panel collapses to icons; a Sidebar.MenuBadge shows a count. Below the md breakpoint the panel is a sheet from the left (bind:openMobile) that closes when a page is chosen.