Skip to content
Design system

Patterns

Validation, cross-tool handoff, and other behaviors that span tools.

Validation

A single summary component covers pass and fail states, with severity counts, filtering, and jump-to-location on each item.

Failing checks

Eight items across error, warning, and info, each with a location and a suggested fix. Filter by severity, or jump to an item.

Validation failed
3 Errors3 Warnings2 Info
  • 12:4Missing required field 'email'Suggested fix: Add an email property to the payload
  • 27:1Unexpected token '}'Suggested fix: Remove the trailing comma before this line
  • 45:18Type 'string' is not assignable to type 'number'Suggested fix: Wrap the value in Number(...)
  • 8:11Unused variable 'index'Suggested fix: Remove the unused variable or prefix it with _
  • 63:3Deprecated API 'componentWillMount'Suggested fix: Migrate to componentDidMount or a hook
  • 102:1Line exceeds 100 charactersSuggested fix: Wrap the line for readability
  • 15:2Consider using const instead of letSuggested fix: Change let to const
  • 140:1File is missing a trailing newlineSuggested fix: Add a newline at end of file

All checks passed

All checks passed

Validation runs on explicit action or debounced input — never on every keystroke for expensive checks. And every error must always say how to fix it, not just what is wrong.

Cross-Tool Handoff

Tools hand state to each other — and to the outside world — without a server. Share links pack state into the URL fragment; tool-to-tool handoffs write through the receiving tool's own localStorage contract.

Share link

ShareButton compresses JSON state into a #fragment link and copies it, reflecting the outcome with the standard icon state-swap. It renders nothing where CompressionStream is unavailable, and links longer than 2,000 characters fail loudly instead of producing an unpasteable URL. A size prop (sm default, or default for 32px) lets it match whichever control row hosts it.

Live: clicking really copies a link (this page's URL with a #ds-demo=… fragment). On tool pages the fragment key is the tool's own — one key per tool, decoded on load.

Hand off to another tool

A handoff pre-loads the receiving tool's input, then either navigates (ScorerLink) or files the data quietly (SaveToCollectionButton). Both accept size (xs / sm / default) so they can match the row they sit in. The receiver owns its storage key and schema; senders import its helpers rather than re-encoding the format themselves.

#312e81
#4f46e5
#818cf8
#c7d2fe
#eef2ff
Score this scheme

Also live: Save really files this palette into the Palette Collection's Saved tab (re-saving the same id updates instead of duplicating), and the scorer link really navigates with its input pre-loaded.

Command Bar

⌘K (Ctrl+K) from anywhere opens a palette over the whole site: recent tools first, then pages, tools grouped by category with status badges, and site actions. A footer strip advertises the hotkeys: ⌥L toggles between live-only and the full catalog, and a leading > scopes the search to actions, VSCode-style. Actions with a site-wide hotkey show it at the row end (hidden on phones): ⌥T toggles the theme, ⌥C high contrast and ⌘B the sidebar. The ⌥ pair stands aside while focus is in a field, where ⌥ types characters on a Mac. Selecting plays the shared menu blink (CommandItem), then navigates with the client router; closing resets the search.

Anatomy

Command wraps cmdk: CommandInput, CommandList on the shared ScrollArea viewport, CommandGroup with the sidebar's uppercase heading treatment, CommandItem rows, and CommandEmpty. The dialog variant mounts the same parts inside the standard Dialog chrome with a screen-reader-only title.

Dialog

The site instance lives in the site layout behind CommandBarProvider. The top-bar search button and ⌘K (Ctrl+K) both open it; this button drives the real one.