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 Blade, React and Vue — the behaviour layer is framework-bound and gets rewritten each time. The spec is what keeps three independent implementations the same component rather than three lookalikes.

Written so far

SpecCovers
color.mdToken selection and the accessibility rules
button.mdButton, icon button, the FAB
input.mdInput, select, textarea, and the two-layer construction
panel.mdBordered card, header, action, divided rows
stat-tile.mdMetric tile, delta, caption
table.mdTable, row, cell, alignment and density
nav-item.mdSidebar item, active state, collapsed state, chip
sheet.mdMobile sheet, rows, the three tones
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
file-upload.mdDrop zone, previews, and where the line is
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, timing
avatar.mdImage, initials, round and square
breadcrumb.mdPath, separators, the current page
empty-state.mdNothing here, and what to say about it
skeleton.mdLoading placeholder, and who announces it
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

Sub-components are covered by their parent: 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, radio-group in radio.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?