@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

Prose

molecules

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.

See also ChatBubbleCodeBlockTextHeading

Release notes

html={renderMarkdown(source)}: headings, lists, a quote, a table, a fenced code block and autolinked URLs.

tsumikit 0.62

The conversation release: everything needed to build an assistant panel, still with zero runtime dependencies.

Highlights

  • ConversationFeed sticks to the bottom and keeps the viewport still when history loads
  • Composer gains a toolbar row and prompt history
  • renderMarkdown turns chat text into safe HTML for Prose

Upgrading from 0.61? Nothing breaks: every new prop is optional.

ComponentChangeBreaking
ChatBubbletimestamp, footer, markdownno
StatusBarnewno
DataTableresponsive="stack"no
import { renderMarkdown } from '@dorsk/tsumikit';
const html = renderMarkdown(message.text);

Full changelog on GitHub, or see https://dorskfr.github.io/tsumikit for the demo.

Default and compact rhythm

compact tightens the vertical rhythm for chat bubbles and dense panels.

Default

Incident 0412

cache-01 ran out of memory at 08:39.

  • 502s on api-gateway for 4 minutes
  • no data loss

Follow-up: raise maxmemory.

compact

Incident 0412

cache-01 ran out of memory at 08:39.

  • 502s on api-gateway for 4 minutes
  • no data loss

Follow-up: raise maxmemory.

Safety and overflow

renderMarkdown escapes raw HTML and keeps only http(s), mailto, relative and #anchor links; long tokens and wide tables wrap, long code lines scroll inside their block.

Links are scheme-checked: docs and mail work, [click me](javascript:alert(1)) stays text.

Raw HTML is escaped: <img src=x onerror=alert(1)> <script>alert(1)</script>

An unbroken token wraps: sha256:9f12e485513e4d6eb987d81a95cead559f12e485513e4d6eb987d81a95cead55

Six columnsthat wraptheir cellsinstead ofwideningthe page
api-gateway-eu-west-1worker-02-eu-west-1cache-01-us-east-1postgres-primarymedia-transcodesearch-index
kubectl -n cyberia logs deploy/api-gateway --since=1h --timestamps --all-containers --prefix | grep -E "5[0-9]{2}" | tail -n 200

Own markup and options

children styles hand-written markup; renderMarkdown(src, { tables: false, autolink: false, highlight }) turns features off or plugs a highlighter.

On-call handover

Two alerts are still open. Check worker-02 before the 09:00 deploy.

  • cache-01: memory alarm, acknowledged
  • search-index: slow queries, investigating

Tables off: | a | b |

Autolink off: https://example.com

SELECT * FROM services WHERE status = 'danger';

Measure

Lines stop at --measure (68ch) however wide the pane; style="max-inline-size: none" lets the text fill the box.

Default

Markdown that runs edge to edge on a wide pane is tiring to read: the eye loses the line start on every return. Capping the measure keeps each line between 45 and 75 characters, where reading speed and comprehension are best, while tables, code blocks and images still fill the prose box.

max-inline-size: none

Markdown that runs edge to edge on a wide pane is tiring to read: the eye loses the line start on every return. Capping the measure keeps each line between 45 and 75 characters, where reading speed and comprehension are best, while tables, code blocks and images still fill the prose box.

Wrapping code blocks

wrap breaks long code lines instead of scrolling them sideways, for narrow panels that must never scroll horizontally.

Default
kubectl -n workloads rollout restart deployment/api-gateway --context production-eu-west-1
wrap
kubectl -n workloads rollout restart deployment/api-gateway --context production-eu-west-1

Props

PropTypeDefaultDescription
html HTMLValue—Rendered as-is: it MUST be trusted or sanitized, tsumikit does not sanitize it unless `sanitize` is set. Pass `TrustedHTML` under Trusted Types.
sanitize boolean | SanitizeOptions—Sanitize `html` client-side: `setHTML` where supported, else `fallback`.
children Snippet—
compact booleanfalseTighter vertical rhythm for chat bubbles.
wrap booleanfalseCode blocks wrap long lines instead of scrolling sideways.
class string''
style string''
MIT · @dorsk/tsumikit