Specs

Each spec is the contract for one component: what it is made of, which variants and states exist, and what a correct implementation must guarantee. Not a style guide — the class strings live in the implementations, and the values live in tokens/.

How to read one

  • Anatomy — the parts, and which token governs each.
  • Variants / sizes — the complete set. If it is not listed, it does not exist; add it here first.
  • States — every state a user can reach, including disabled and loading.
  • Accessibility — the non-negotiables.
  • Do not — the mistakes already made once, so they are not made again.

Why specs at all

Components cannot be shared across stacks — the behaviour layer is bound to the one it is written for. The spec is what travels: the contract the Blade component is held to, and the one a component written on the tokens elsewhere can be held to as well, so the two are the same component rather than lookalikes.

Written so far

SpecCovers
color.mdToken selection and the accessibility rules
chart-series.mdThe eight series colours, why they mean nothing, and the order that is the safety property
button.mdButton, icon button, the FAB
input.mdInput, select, textarea, the two-layer construction, reveal and clearable
panel.mdBordered card, header, action, divided rows, collapsible
stat-tile.mdMetric tile, delta, caption, the counter roll
table.mdTable, row, cell, alignment and density, the tree table (treegrid)
nav-item.mdSidebar item, active state, collapsed state, chip
sidebar.mdOne element as rail and drawer, the breakpoint read from the CSS, state handed to the items through @aware, the cookie
sheet.mdMobile sheet, rows, the three tones, snap points and drag
modal.mdModal, sizes, the focus contract
drawer.mdEdge panel, and which of the three overlays to reach for
dropdown.mdMenu, items, placement, the keyboard contract
select.mdListbox, and when the native select is still right
combobox.mdFiltering select, and why multiple is a mode of it
switch.mdSwitch, and what it is that a checkbox is not
date-picker.mdCalendar, ranges, and why dates are strings
calendar.mdThe month grid the date picker shares, modes, markers, the server's today
file-upload.mdDrop zone, previews, and where the line is; host-driven progress rows that speak once per file
save-bar.mdSticky not fixed, a FormData snapshot or the host's data-ds-dirty, native submit and reset, one polite announcement
selection-bar.mdSelectable table rows, the mixed header box, Shift ranges with native change events, select all across pages
avatar-upload.mdChoose, crop square in the browser, post as a file; never upload
share-sheet.mdPeople, roles, general access and the link; posts as a form, reports by events
swipe-actions.mdA row that slides to show its actions; the swipe is a shortcut, never the only way
pull-refresh.mdPull to refresh on touch, a button for everyone, and the three ways a refresh ends
accordion.mdDisclosure sections, and the one piece of state
checkbox.mdCheckbox, indeterminate, the styled native input
radio.mdRadio, and why the group is a fieldset
tabs.mdTabs, panels, and tablist vs navigation
tooltip.mdTip, placement, and why it is never the only copy
toast.mdToast, the always-rendered region, the undo toast's countdown, events and keyboard
avatar.mdImage, initials, round and square, the status dot
breadcrumb.mdPath, separators, the current page
empty-state.mdNothing here, and what to say about it
skeleton.mdLoading placeholder, and who announces it; the shimmer band
skeleton-swap.mdPlaceholder and content in one cell, aria-busy as the only state, the Livewire route
loader.mdFive CSS indicators and the still form of each under reduced motion
shimmer.mdThe background-clip text sweep, and who announces the wait
progress.mdBar and ring, indeterminate, the one custom property
usage-meter.mdAllowance, thresholds, segments, meter vs progressbar
upgrade-prompt.mdNear, at and over the limit; the gate that never holds the locked content
checklist.mdCounted from its items, the first not done open, why there are no checkboxes
counter.mdThe digit roll, its two routes, the hidden text, and how it relates to stat-tile
sparkline.mdOne viewBox stretched, non-scaling strokes, gaps, the generated summary
gauge.mdArcs by dash, bands and their words, meter values past the range
activity-heatmap.mdWeeks as rows turned by CSS, the scroll that starts at the end, the one-hue ramp
bar-chart.mdPercent x and px y so text never scales, labels thinned by container query, the keyboard model
line-chart.mdA nested stretched plot, the monotone curve, gaps, end labels and the legend rule
donut-chart.mdArcs by dash, the fold into Other, largest-remainder shares, when not to use one
split-bar.mdFlex-basis segments with a least width, the rest as track, inline names that fall back by container query
waffle-chart.mdCells by largest remainder, one image not a hundred cells, a mark drawn in pieces, reading order and rtl
activity-rings.mdDashes shortened by their round caps, rings narrowed to leave a hole, a goal passed said not drawn
slope-chart.mdTwo axes in the bar chart's frame, labels spread apart greedily, the change written on every label
funnel-chart.mdCentred bars on one hue's ramp, the drop written between stages, values inside or beside by container query
radar-chart.mdPolygons from polar points, a marker and a dash per series, names anchored by angle, the table on by default
treemap.mdThe squarified layout, tiles that clip their own labels, ink chosen for contrast, links that stay links
timeline.mdTimeline, timeline-item and timeline-group: the rail each item draws, time elements, sticky groups
stepper.mdSteps, statuses, the narrow-width collapse
avatar-group.mdOverlapping avatars, the ground ring, the spoken sentence
alert.mdAlert, tones, wash-not-tint, the live-region rule
badge.mdBadge, three variants, five tones, the dot
icon.mdIcon, sizes, the v1 name bridge, the a11y default
bottom-nav.mdBottom bar, items, the safe area
pagination.mdBoth paginator views
otp-input.mdOne box per character, one posted field, the complete event
tag-input.mdFree-text chips, refusals that stay, separators
number-field.mdNative number input, step buttons, press-and-hold
slider.mdNative range inputs, one or two on a track; the thumb, the fill, thumbs that do not cross; a histogram whose lit bars and count agree
money-input.mdAmounts as digit strings in PHP and JS, locale grouping with a stable caret, the moving name, minor units
phone-input.mdA select as the country store, the popover picker, masks, the trunk 0, E.164, a length check that is not libphonenumber
shortcut-input.mdRecording on keydown, refusals and conflicts, Tab never taken, the change event, the platform drawing
mention-input.mdA textarea combobox only while a trigger is typed, the list under the trigger by a mirror, Undo-able inserts, ids that stop posting when broken
color-picker.mdHSV held, sliders of our own, forgiving parsing shared with PHP, contrast cut not rounded, presets that post nothing, the native fallback
time-picker.mdA native time field the script turns into a combobox; forgiving typing that never changes the time
inline-edit.mdRead state as a button, a field in the same box, save and fail as attributes the host sets
command-palette.mdThe modal's layer, a combobox that keeps focus, ranking by CSS order, options that change under it
sortable-list.mdPointer drag with capture and FLIP, the keyboard pick-up, the buttons for WCAG 2.5.7, what survives a morph
split.mdSizes as CSS variables for the first paint, the window splitter pattern, which pane a divider controls
password-strength.mdThe four-level hint and its heuristic
copy-button.mdCopy, the in-place confirmation, the failure event
swap-button.mdA face that confirms in place, the swap recipe shared with copy, the toggle and its fixed name
icon-swap.mdTwo icons, or three bars, turned by the parent's state through one custom property, no script
rating.mdStars over radios, "No rating", the readonly image
chip-group.mdFilter chips, inputs or links, binding through the group
radio-cards.mdCard-shaped radios, columns, stable ids
segmented-control.mdRadios or links in a track, the glide directive, why no script is needed
button-group.mdJoined buttons, the split button, why it is a class
toolbar.mdOne Tab stop, roving focus, the hover highlight, pressed
toggle-group.mdSingle and multiple toggles, what posts, inside a toolbar
announcement-bar.mdBanner above the chrome, the pre-paint dismissal check, landmark not live region
trial-banner.mdDays left counted on the server, the tone escalation, the ended state, bar or card
confirm-button.mdAsking in place, the fail-safe confirm control, the width it grows by
hold-button.mdHold to confirm, the two-press path for keyboard and assistive technology
confirm-popover.mdAnchored confirmation, type-to-confirm, why alertdialog
popover.mdAnchored panel for anything interactive, placement, the focus contract
hover-card.mdPreview on hover or focus, the open and close delays, never on touch
context-menu.mdThe dropdown's menu at the pointer, Shift+F10, the long press
sub-nav.mdA rail section holding its pages, the indent, the collapsed rail
top-nav.mdA header and a named nav, container-query fold into a drawer drawn only while open, groups as disclosures not menus
page-header.mdThe page's heading, container-query layout, secondary actions as data so they can fold into More
theme-switcher.mdLight, dark or system, the pre-paint script, the view transition
user-menu.mdThe account menu on the dropdown, the POST sign-out, the theme row, why it stays a dropdown on phones
team-switcher.mdA popover listbox over a no-script select or links, ranked search, the change event x-model can read
tree.mdNavigation, single and checkbox trees, structure counted in PHP, the keyboard model
filter-bar.mdSearch, controls and chips as layout, the collapsible fold rendered once, filter-chip
json-viewer.mdNative details drawn in PHP, the breadth-first node budget, stubs, the path and value a node copies
presence-stack.mdAvatar status shapes, faces with tooltips, the ghost that fades out, wire:key, announcing
photo-grid.mdGrid, masonry and justified rows by container width, the missing-alt rule, "+N", the clip on the link
lightbox.mdThe modal layer in dark tokens, openers by name, loading and error, swipe, zoom and pan, focus back to the last photo
link.mdThree variants at 4.5:1 on every surface, the underline, external, no space after it
link-preview.mdOnly http(s) is a link, one link named by title and domain, the image fallback without script, dismissal
audio-player.mdOwn controls over a native audio, the waveform lit by one property, words for the time, one at a time, cues
dictation-button.mdHidden until recognition exists, a toggle renamed as it listens, insertion at the caret, the ways it stops
agent-status.mdThe status set the agent components share; a polite atomic region with the clock outside it
reasoning.mdNative details open while thinking, the reader's choice kept over a re-render, a column-reverse body that follows the text
tool-call.mdOne invocation as a details card, what draws arguments and results, approval, the group's aggregate
agent-plan.mdSteps read from the rendered slot, the current step marked in HTML, compact by CSS
agent-timeline.mdBuilt on the timeline: kind markers, a dashed rail ahead, a fold that leaves rows in place, follow
starter-prompts.mdA list of buttons or links that post with no script, fill a field with a native input event, a cancelable select
sources.mdSource cards as spans and one link, the shared URL rules, anchors per answer, the citation's hover card
response-feedback.mdToggle thumbs that clear, a form that posts without script, the in-flow follow-up, the thanks region
agent-handoff.mdOne sentence carries it, avatars hidden, the shared status set, row and divider
generation-stats.mdA dl with hidden names on one line, PHP formatting, unusual stops as a badge, a native-details popover
api-key-field.mdNever holds a key: value refused, masked hint, the opt-out attributes, the hidden default button, intents
provider-status.mdThe provider status set, a worst-of summary, one live region that speaks only on a change of state
metric-ticker.mdCounters with chips and sparklines; wrap, scroll and a pausable marquee that stands still under reduced motion
code-block.mdChrome without a highlighter, the token colours, the indentation trap, lines that copy
scroll-area.mdNative scrolling, scroll-driven edge shadows with a script fallback, when the region is a Tab stop
kbd.mdA key sized by its text, and combinations
divider.mdDecorative unless it separates groups; the labelled form; vertical in a row
expandable-text.mdA measured clamp that fails open, the fade, the button that moves no focus
notification-list.mdGroups under headings, a stretched link with nothing nested, unread in words, read and dismiss events

Sub-components are covered by their parent: accordion-item in accordion.md, table-cell and table-row in table.md, panel-row in panel.md, sheet-item in sheet.md, dropdown-item in dropdown.md, bottom-nav-item in bottom-nav.md, breadcrumb-item in breadcrumb.md, tab and tab-panel in tabs.md, step in stepper.md, radio-group in radio.md, chip in chip-group.md, radio-card in radio-cards.md, segment in segmented-control.md, toolbar-button and toolbar-separator in toolbar.md, toggle in toggle-group.md, tree-item in tree.md, filter-chip in filter-bar.md, swipe-action in swipe-actions.md, checklist-item in checklist.md, tool-call-group in tool-call.md, agent-plan-step in agent-plan.md, agent-timeline-item in agent-timeline.md, source-card and citation in sources.md, provider-keys in api-key-field.md, provider-status-item in provider-status.md, top-nav-item in top-nav.md, file-upload-item in file-upload.md, notification-group and notification-item in notification-list.md, and toast-region in toast.md.

Every built component now has a spec. Specs are written alongside their implementation, not before it and not after — a speculative spec for a component nobody has built yet is fiction, and a component that shipped without one is a component whose reasons are already lost.


From the package repo: edit this page on GitHub.

Was this page helpful?