@dorsk/tsumikit

Svelte 5 · pure CSS · zero deps
AppShell Principles
v0.101.0
Foundations
Typography 5 ThemeTokens 5 Theming 3 TextScaling 3 Breakpoints 1
Atoms
Artwork 3 Avatar 3 Badge 4 Button 8 Card 6 Checkbox 4 Divider 3 Dot 3 Gauge 4 Heading 3 Icon 4 Input 4 Kbd 3 Link 5 Progress 5 Scrim 3 SegmentedProgress 3 Select 3 Skeleton 5 Slider 3 Spinner 4 Swatch 3 Switch 4 Text 5 Textarea 5 Thinking 2 TimeDisplay 3
Molecules
Accordion 3 AttachmentList 3 Breadcrumb 3 ButtonGroup 3 Callout 3 CapBar 3 Carousel 3 ChatBubble 4 CodeBlock 4 Combobox 3 Composer 3 ConfirmModal 3 CopyButton 4 Disclosure 4 Drawer 3 Dropzone 3 EmojiPicker 3 EmptyState 4 Field 4 Fieldset 4 FileButton 3 FilterChips 6 FilterInput 4 FontScalePicker 3 GitRef 3 GlyphStack 3 IconButton 4 InputGroup 3 KeyValue 3 LoadMore 3 LookPicker 3 Menu 4 Meter 4 Metric / StatTile 4 Modal 3 MotionSettings 3 NotificationItem 2 OptionButton 3 Pagination 4 Popover 3 Prose 6 PullToRefresh 3 RadialMenu 3 RadioGroup 4 RichSelect 3 SectionHeader 3 SeekSlider 4 SegmentedControl 7 SelectButton 3 SortableList 4 SoundSettings 3 SplitButton 3 StatusBar 3 SwipeRow 3 Tabs 6 ThemePicker 3 Timestamp 3 Toaster 6 Toggle 3 Tooltip 3 Truncate 3 VolumeSlider 3 WorkingDir 3
Organisms
ConversationFeed 3 ConversationPanel 3 DataTable 9 FilterSearchBar 4 NotificationCenter 5
Layouts
AppShell 3 Backdrop 3 Container 3 Stack 4 Cluster 4 AutoGrid 3 MasterDetail 4 ResizablePanel 4 NavSection 3 NavItem 4 NavBar 4 TabBar 4 Toolbar 5

Svelte 5 components styled with plain CSS variables. Pick a component for its live examples, snippets and props.

Foundations

Typography

The type scale, text variants, tones and weights that every component draws from; all rem-based and driven by --fs-* tokens.

ThemeTokens

The semantic CSS custom properties every theme defines: surfaces, text, borders, status colours, spacing, radius and shadow.

Theming

Thirty built-in light and dark themes picked through the theme store, plus theme.register() to ship your own [data-theme] block.

TextScaling

Opt-in in-app text size: --fs-scale multiplies the text tokens only, so body copy grows while chrome stays compact.

Breakpoints

The shared breakpoint list (sm 40rem, md 48rem, lg 64rem) used by every kit @media rule, exported as breakpoints / mq for JS, and enforced by tsumikit-lint; reach for container queries inside panes.

Atoms

Artwork

Cover or thumbnail tile: a lazy image that falls back to a seeded gradient with initials or an icon, sized by width and aspect ratio, with a corner status overlay.

Avatar

Initial or glyph on a hashed-hue disc or square: a name seeds a stable colour, status pins a Dot to the corner, decorative hides it when the row already names the person.

Badge

The single pill: semantic tones or any colour for state, mono for metadata, removable or action-bearing for tags, numeric for counters.

Button

The one control for actions: four variants, five tones, four sizes, a corner count and a stacked hotbar layout, all on a native button or link.

Card

The elevated surface: padding, surface and border presets, semantic tones, tappable or keyboard-interactive, stacked piles, header and footer slots.

Checkbox

A real <input type="checkbox"> with a token-styled box, an attached label, indeterminate and three sizes.

Divider

A hairline between siblings: horizontal or vertical, three tones, optional centred label, semantic separator or purely decorative.

Dot

A small status disc with a semantic preset or any colour, an optional label, a glow halo and a dark ring for legibility over artwork.

Gauge

A compact vertical level indicator (continuous fill or lit segments) whose tone follows warn/danger thresholds; renders as a meter, button or link.

Heading

The only h1–h6 primitive: level sets the semantic rank, size overrides the visual size so document outline and chrome sizing stay independent.

Icon

Open icon atom: a curated set of named lucide glyphs sized at 1em, plus a children snippet for any raw SVG path; tone, size, spin and filled.

Input

Single-line text input on a native <input>: sizes, pill shape, leading icon, clear button, mono, and Enter submit.

Kbd

Keyboard shortcut chips: one kbd per key with platform-aware glyphs, so mod reads ⌘ on a Mac and Ctrl elsewhere.

Link

Inline text link without button chrome: an anchor when given href, otherwise a button for in-page actions that read as links.

Progress

Determinate or indeterminate progress bar with semantic tones, auto thresholds, markers, stripes, a gradient fill and a value readout.

Scrim

Full-viewport click target that dims the page behind a custom panel: closes on click and on Escape (topmost only), optionally hidden under a viewport width.

SegmentedProgress

One bar split into toned segments: per-segment value/max tracks, or a stacked breakdown with an optional legend.

Select

Native <select> with a themed chevron and an options array that adds icon, emoji, hint and optgroup sections to the trigger.

Skeleton

Shimmering placeholder bars standing in for content that is still loading; decorative, so the surrounding region carries aria-busy.

Slider

A native <input type="range"> restyled from tokens with a filled track, a value readout, ticks and clickable labelled marks.

Spinner

Inline loading indicator: the spinning loader glyph by default, or a pure-CSS pictogram variant drawn in currentColor inside a 1em box.

Swatch

A filled chip showing a colour: an image when labelled, decorative otherwise, and a pressable button with a selection ring for palette pickers.

Switch

On/off toggle with role="switch": a pill track and sliding knob, bindable checked, optional visible label and three sizes.

Text

The only text primitive: variant presets for body, label, caption, code and eyebrow, with tone, weight, size, numeric and truncation axes.

Textarea

Multi-line text input with autoresize, a themed drag handle on either edge, a max height and keyboard submit.

Thinking

Chat "assistant is working" indicator: rising dots, or a status word with a light sweeping through it and a blinking caret.

TimeDisplay

A "1:02 / 23:45" media readout in tabular numbers; click toggles to time remaining, live streams show the position only.

Molecules

Accordion

A stack of Disclosures from an items array: single- or multi-open, a plain borderless variant, a compact size and a summary snippet that receives the item and its open state.

AttachmentList

Removable file chips that collapse to square tiles in narrow containers; a tile popover carries the full name, size, preview and actions.

Breadcrumb

A path of links to the current page: wraps or truncates, collapses the middle with an ellipsis, and takes any separator.

ButtonGroup

Child Buttons joined into one control: one outer radius, one divider between segments, a tab stop per segment.

Callout

Inline message banner: a tone-tinted Card with glyph, title, body, right-aligned actions, a dismiss button and a busy spinner.

CapBar

A usage bar with a draggable cap: value is what is used, cap is the limit you drag or arrow-key, with warn tones, an expected marker, uncapped mode, stacked layout and readonly.

Carousel

One slide at a time from any array: prev/next, dots, a counter, swipe, ←/→ and Home/End, optional loop and autoplay that pauses on hover and focus.

ChatBubble

One conversation line: a role-tinted bubble with a timestamped meta row, markdown body, footer stats, copy and actions, delivery state and clamp-and-expand.

CodeBlock

Dependency-free chrome around code: language or filename header, copy button, line numbers, soft wrap, height cap and collapse, with your own highlighter or pre-rendered HTML.

Combobox

Floats a listbox of suggestions under a field you render; owns placement, combobox ARIA and the keys while you own when it opens and what it lists.

Composer

The chat input: an autoresizing textarea fused with attach and send, Enter or mod+Enter to submit, ↑/↓ prompt history, paste and drop to attach, and an optional toolbar row.

ConfirmModal

Yes/no dialog on Modal: an async onconfirm keeps it open and busy, a rejection shows the error so the user can retry or cancel.

CopyButton

Copies a string to the clipboard and flips to a transient "Copied" state, announced to screen readers.

Disclosure

One expandable panel: a native button with aria-expanded over a panel that find-in-page can open, a header snippet that knows whether it is open, a chevron on either side and bindable open.

Drawer

Side panel on the native <dialog> with an optional page-nav column and sticky footer; full-screen under 48rem.

Dropzone

Drag-and-drop file area with a click and keyboard fallback to the native picker; overlay mode turns any surface into a drop target while a file hovers.

EmojiPicker

Popover emoji chooser with a search box, a tab strip of catalogue groups and an arrow-key grid; desktop browsers have no emoji keyboard.

EmptyState

The "nothing here" panel for empty lists, zero results and unworked sections: icon chip, title, description and an action.

Field

Label, hint and error around any form control; the control adopts the id, aria-describedby and aria-invalid through context.

Fieldset

Bordered zone whose legend rides the top border; droppable turns it into an HTML5 drop target with a hover highlight and hint.

FileButton

A real file input hidden inside a label styled as a Button: keyboard focusable, opens the native picker with no JS and emits the chosen files.

FilterChips

One row of filter chips with counts for "pick one of N" (or several): scrolls with an edge fade when it overflows, or collapses to a single dropdown chip.

FilterInput

The headless query field under FilterSearchBar: the same schema-driven autocomplete, with inline and display snippets instead of chips, and a single-key mode for one structured value.

FontScalePicker

Opt-in text-size control: an "A" trigger opens a stepped slider that drives --fs-scale for text only, chrome stays fixed.

GitRef

Branch chip, pull-request link and +/− diff stats in one inline row; the PR state picks the tone and narrow containers drop to glyphs.

GlyphStack

Run of up to four small glyphs that folds into a 2×2 grid of 1rem cells in a narrow container, with optional tap or slide-to-pick tiles.

IconButton

Button reduced to one glyph with a required accessible label: ghost by default, inline for chip removes, chip for toolbar squares, pressed for two-state toggles.

InputGroup

Fuses leading and trailing controls to one Input or Textarea: the field draws the single border and ring, the adornments drop into a bar once a textarea grows.

KeyValue

Label and value pairs in one or two columns: toned values, mono values, a hint line, dense spacing, end alignment and snippet values.

LoadMore

The row at the end of a growing list: a load button, a spinner while loading, an error with retry, and a quiet "no more" when the list is complete.

LookPicker

Look switcher: picks the structural look (polished, depth, tactile, editorial), an axis independent of the theme colors; every look derives its colors from the active theme.

Menu

Dropdown menu on the native popover: arrow-key navigation, icons, tags, checkable rows, danger items and hosted control rows.

Meter

A labelled, read-only level with its readout: a quota, disk or budget bar with markers, warn and danger thresholds, a caption and trailing actions. Progress is the bare bar; Gauge is the tiny inline dial; CapBar adds a draggable cap.

Metric / StatTile

The dashboard "one number" tile: micro-label, mono value with unit, a sub-line, a tinted icon chip, extra segments, link or button behaviour and an inline layout. StatTile is the same component.

Modal

Dialog on the native <dialog>: top layer, focus trap, Escape and click-outside, four width presets, tones, busy state and optional resizing.

MotionSettings

Per-family micro-interaction picker: one compact select per family (button hover, checkbox, radio, switch, focus, tabs, copy, link, card), persisted and painted as data-fx-* on <html>.

NotificationItem

One notification row: tone icon, title, two-line text, relative time, unread dot, up to two actions plus a "…" menu, inline confirm and a pending state; resolved items turn muted with their state label.

OptionButton

Selection card that gains a coloured ring and tint when selected; tone recolours each picker; row and block turn it into a list item.

Pagination

Page controls for long lists: page mode (bind:page + pageCount) or offset mode (bind:offset + limit + total), with edges, siblings, a range readout and a compact collapse.

Popover

Floating panel on the native Popover API: top layer, light dismiss, Escape, smart placement and a Button-compatible trigger.

Prose

The markdown style contract: headings, lists, quotes, inline and block code, tables and images for renderMarkdown output or your own markup, themed by the --md-* tokens.

PullToRefresh

Touch and pen pull-down gesture on a scroll container that awaits onrefresh behind a spinner, with live-region announcements.

RadialMenu

A round FAB that fans MenuItems out as petals on an arc over a scrim; tap to toggle, press-and-slide to pick, arrows to walk.

RadioGroup

Native radios sharing one name as a list, bordered rows with a trailing action and a panel below, or colour swatches.

RichSelect

A select whose options are full cards: the closed trigger shows the selected card, the open list shows every card with per-row actions, drag to reorder and a footer.

SectionHeader

The heading row of a list or group: title, subtitle, count, icon or hue swatch, trailing actions, a divider, a group rule, and collapsible or sticky behaviour.

SeekSlider

Media scrubber that previews while dragging and commits once on release, with buffered ranges, a hover time tip and a live mode.

SegmentedControl

Single-select row of segments with a sliding thumb: labelled filter pills with counts, or compact icon toggles, with radiogroup keys.

SelectButton

A glyph button with a transparent native select on top: the platform dropdown with an icon-button footprint, for toolbar pickers.

SortableList

Reorderable list with a drag grip, arrow buttons and a full keyboard grab mode, announcing every move; rows can be locked, vetoed and selected.

SoundSettings

Opt-in UI sound: a speaker popover with the on/off switch, a volume slider, a preview button and the reason nothing plays.

SplitButton

A primary action fused with a caret that opens a Menu of alternatives: one radius, one divider, two tab stops.

StatusBar

A thin live-status row for a panel: a tone dot (a spinner while busy), a label or custom content, and a trailing slot for timers and counters.

SwipeRow

List row that reveals a leading or trailing action on a horizontal swipe and fires it past a threshold, with keyboard buttons for the same actions.

Tabs

WAI-ARIA tabs with an animated indicator: a tablist over one panel, or a standalone document strip with counts, icons, closable tabs and trailing actions.

ThemePicker

Theme switcher: the trigger shows the active palette swatch and opens a popover grid of light and dark themes, with an optional auto mode.

Timestamp

Subdued instant in one of six modes (date, time, datetime, relative, iso, short-iso) that opens UTC, local, relative, zone and epoch on click.

Toaster

Bottom-centred toast stack fed by the toasts store: five tones, timed or sticky, an optional async action with a close button beside it, undo with optimistic apply, a one-row status toast updated in place (reconnecting, offline, syncing) that can pin to the top, pause on hover, swipe sideways on touch to dismiss, moves into an open modal.

Toggle

A muted chip that lights up when pressed; recolour the on tint per use with tone for filters, formatting and behaviour switches.

Tooltip

Hover and focus bubble in the top layer; a content snippet turns it into a persistent hovercard you can move into and copy from.

Truncate

Character-count truncation at the end, middle, start or by path segment, or fitted to the measured width, with a full-text tooltip and optional copy.

VolumeSlider

Mute button and level slab in one control: drag, arrow keys or the wheel set the level, and the icon follows it.

WorkingDir

Path chip that abbreviates fish-style as its width shrinks (ancestors to initials, then the leaf alone, then an ellipsis), with the full path in the tooltip.

Organisms

ConversationFeed

A scrolling message log that sticks to the bottom while you are there, keeps the viewport still when older items are prepended and offers a jump-to-latest pill.

ConversationPanel

The chat column layout: a header, the feed filling the middle, a live status row and the composer pinned at the bottom.

DataTable

A typed, generic table: column accessors and cell snippets, sorting, row tones and hover actions, loading and empty states, and a card layout once its own box gets narrow.

FilterSearchBar

A structured search bar over a small query language: type role:worker cpu>=50 by hand or build it from the schema-driven dropdown, get removable chips and a parsed AST to run anywhere.

NotificationCenter

A bell with an unread badge that opens the notification list: a Popover on fine pointers, a bottom Drawer on touch and narrow screens; day groups, mark all read, filters, paging and a footer slot.

Layouts

AppShell

The application frame: sticky header, sidebar, main and footer, with a resizable desktop sidebar, a tablet icon rail and a mobile drawer.

Backdrop

A full-bleed hero image that fades into the page background, with a built-in scrim so the title and actions on it stay readable; a missing picture shows the Artwork placeholder.

Container

A max-width content column with token gutters that respect safe-area insets, and a gutter children can bleed through.

Stack

A vertical column with one consistent gap, alignment and an auto-margin push, polymorphic over div, section, form, list or nav.

Cluster

A horizontal row with one gap that wraps instead of overflowing, can stack at a container width and cascades one control height to its children.

AutoGrid

An intrinsically responsive grid: columns at least min wide fill the row and wrap, optionally capped by max width or maxCols, no media queries.

MasterDetail

List and detail columns that scroll independently, becoming one pane at a time with a sticky back header when the component itself is narrow.

ResizablePanel

A side panel with a drag and keyboard resize handle, min and max bounds, a collapse chevron, persisted width and an overlay drawer mode.

NavSection

A labelled group of sidebar NavItems with consistent spacing; at icon-rail width the label hides and a hairline divider separates the groups.

NavItem

A sidebar link or button with icon, label and a trailing count that collapses to an icon and a dot when its sidebar narrows to a rail.

NavBar

A horizontal nav landmark of links or in-page tabs with count badges, a centre notch for a raised action, and flush, floating or bottom-bar placements.

TabBar

A phone bottom tab bar fixed to the safe-area edge that publishes --tabbar-h, as a tablist with roving focus or a nav of links.

Toolbar

A horizontal action bar with one tab stop and arrow-key roving focus that folds data-overflow children into a … menu when it gets narrow.

MIT · @dorsk/tsumikit