@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

ResizablePanel

layouts

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

See also MasterDetailAppShellDrawer

Code editor file tree

Drag or arrow-key the separator; widthKey restores the width and the collapsed state on reload, clamped to minWidth and maxWidth.

src/lib/index.ts export { default as Button } from './components/atoms/Button.svelte';

Right-hand inspector with live width

side="right"; minWidth="10rem" and maxWidth="70%" take CSS lengths; onresize streams the width, onresizeend reports where it settled; resizeStep sets the arrow-key step.

worker-02
CPU
87%
Memory
1.9 GB
Region
eu-west-1
Live: 240px Settled: 240px

Collapsible build log

bind:collapsed drives the panel from outside as well as from its edge chevron; persistCollapsed={false} keeps only the width.

$ npm run buildvite v6.0.0 building for production…✓ 412 modules transformedbuilt in 3.84s
Deploy #1824 main · 4 commits · passed

Overlay run details drawer

mode="overlay" fixes the panel to the viewport edge above a scrim; Escape or the scrim closes it; under fullWidthBelow="40rem" it spans the screen.

Props

PropTypeDefaultDescription
panel required Snippet—Content shown while the panel is expanded.
children Snippet—Main content beside the panel (optional in overlay mode).
side 'left' | 'right''left'Physical edge occupied by the panel.
label string'Side panel'Accessible name for the panel landmark / dialog.
width number280Initial expanded width in pixels.
minWidth number | string180Pixel number or CSS length (`'12rem'`, `'30vw'`).
maxWidth number | string480Pixel number or CSS length (`'40rem'`, `'90vw'`).
widthKey string—localStorage key used to restore the expanded width.
collapsed bindable booleanfalseBindable collapsed state (inline mode).
persistCollapsed booleantruePersist collapsed state as `${widthKey}:collapsed`.
resizeStep number16Pixels added or removed by each resize-separator arrow key press.
onresizestart () => void—A pointer drag of the separator began. Pair with `onresizeend` to suspend expensive work in the panel body while the width is in flux.
onresize (width: number) => void—Live width, once per animation frame while dragging and on each keyboard step.
onresizeend (width: number) => void—Settled width: on pointer release, and after each keyboard step.
handlePlacement 'top' | 'bottom''bottom'Anchor the collapse handle at the top or bottom of the panel edge.
stickyHandle booleantrueKeep the collapse handle in view when the panel scrolls past the viewport, repositioning on scroll/resize via requestAnimationFrame.
mode 'inline' | 'overlay''inline'`inline` shares the row with `children`; `overlay` fixes the panel to its viewport edge as a non-modal drawer above the page.
open bindable booleanfalseBindable drawer visibility (overlay mode).
onclose () => void—Overlay mode: Escape, scrim click or the edge control closed the drawer.
scrim boolean—Overlay mode: dim the page behind the drawer; clicking it closes (default true).
fullWidthBelow string—Overlay mode: viewport width (CSS length) under which the drawer spans the full viewport and hides its resize handle and scrim.
clampToViewport booleantrueOverlay mode: cap the width at the viewport and re-clamp on window resize.
collapseControl boolean—Render the edge chevron. Defaults to on inline, off in overlay mode (Escape and the scrim already close a drawer).
class string''
style string''
MIT · @dorsk/tsumikit