COMPONENTS
The design-system/ directory contains eleven components. Ten have no client directive; Field is a client component. The docs also provide a client CopyButton helper from app/. Server-compatible components ship client JavaScript when imported through a client boundary.
Button
| Prop | Type | Default | Required |
|---|---|---|---|
Propvariant | Type'primary' | 'secondary' | Default'primary' | Requiredno |
Propsize | Type'sm' | 'md' | 'lg' | Default'md' | Requiredno |
Propas | Type'button' | 'a' | Default'button' | Requiredno |
Prophref | Typestring | Defaultnone | Requiredyes when as="a" |
Propdisabled | Typeboolean | Defaultfalse | Requiredno |
Accessibility: At least 44px wide. The small size is 36px tall (--spacing-target-pointer) on a fine pointer and keeps the 44px minimum height on touch; medium is 44px and large is 52px at every pointer. The width never drops below 44px. focus-visible outline using --color-primary-500. Disabled anchors use aria-disabled="true", drop href, leave the tab order and cancel click (anchors can't be natively disabled). A button defaults type to "button", so it never submits a surrounding form by accident.
Field
| Prop | Type | Default | Required |
|---|---|---|---|
Propname | Typestring | Default· | Requiredyes |
Proplabel | Typestring | Default· | Requiredyes |
Proptype | TypeInputHTMLAttributes[ | Defaultbrowser default (text) | Requiredno |
Propmultiline | Typeboolean | Defaultfalse | Requiredno |
Proprows | Typenumber | Default4 | Requiredno |
Properror | Typestring | Default· | Requiredno |
Propid | Typestring | Defaultgenerated with useId | Requiredno |
SOURCE
<Field name="email" label="$ email:" type="email" />
<Field name="msg" label="$ message:" multiline rows={3} />
<Field name="broken" label="$ broken:" error="Required field" />Accessibility: Label is always rendered and associated through the supplied id, or an id generated with useId, so two fields with the same name never share one. Error text is appended to any consumer aria-describedby. aria-invalid="true" is set on error.
Badge
| Prop | Type | Default | Required |
|---|---|---|---|
Propvariant | Type'default' | 'dot' | Default'default' | Requiredno |
Propsize | Type'sm' | 'md' | Default'md' | Requiredno |
SOURCE
<Badge variant="dot">OPEN_TO_WORK</Badge>
<Badge variant="default">AVAILABLE</Badge>
<Badge size="sm">SMALL</Badge>Sizing: Both sizes use text-xs: 13px at every width. There is no smaller mobile override. Below 360px the badge wraps instead of overflowing.
Other <span> attributes pass through and className is appended.
Accessibility: Dot is aria-hidden. Pulse animation stops when the motion switch is off (body[).
TerminalPanel
| Prop | Type | Default | Required |
|---|---|---|---|
PropborderStyle | Type'solid' | 'dashed' | Default'solid' | Requiredno |
Propas | Type'div' | 'section' | 'article' | Default'div' | Requiredno |
Propheader | TypeReactNode | Default· | Requiredno |
SOURCE
<TerminalPanel header="[ STATUS ]">Content here.</TerminalPanel>
<TerminalPanel borderStyle="dashed">Dashed panel.</TerminalPanel>A 1px primary-subtle border on an opaque secondary-950 background. With header, a bottom-bordered title bar renders above the content. Other div attributes pass through.
BrandIcon
| Prop | Type | Default | Required |
|---|---|---|---|
Propsize | Typenumber | Default60 | Requiredno |
PropclassName | Typestring | Default· | Requiredno |
SOURCE
<BrandIcon />
<BrandIcon size={90} />
<BrandIcon size={40} />The brand mark as one inline SVG path. size is the width in px; the height follows the cropped viewBox. It fills with currentColor, so the surrounding text colour (--color-primary-500 in the header) paints it, and a static drop-shadow gives the phosphor glow of the CRT headings; print removes the glow. It is aria-hidden: the link that wraps it carries the name. The BrandLink component in components/ pairs the two, with a 44px minimum target and the accessible name from content/ (erikunha. or erikunha., chosen by its locale prop). SiteShell mounts BrandLink in the header of every page.
WindowChrome
| Prop | Type | Default | Required |
|---|---|---|---|
Propsize | Typenumber | Default10 | Requiredno |
PropclassName | Typestring | Default· | Requiredno |
Propstyle | TypeCSSProperties | Default· | Requiredno |
SOURCE
<WindowChrome />
<WindowChrome size={12} />
<WindowChrome size={9} />Renders the three macOS-style traffic-light dots (red/yellow/green) as a pure RSC. Dots are aria-hidden="true" · purely decorative, no focus management. The size prop sets dot diameter in px and defaults to 10, the size used in the shell and contact panel headers (TerminalChromeBar).
StatTile
| Prop | Type | Default | Required |
|---|---|---|---|
Propvalue | Typestring | Default· | Requiredyes |
Proplabel | Typestring | Default· | Requiredyes |
Propvariant | Type'default' | 'compact' | 'display' | Default'default' | Requiredno |
- LH_SCORE
- 99
- YRS_EXP
- 5+
- LCP
- 1.2s
SOURCE
<StatTile value="99" label="LH_SCORE" variant="display" />
<StatTile value="5+" label="YRS_EXP" />
<StatTile value="1.2s" label="LCP" variant="compact" />Layout: A label wraps between words, never inside one. The tile reads --stat-tile-pad-x (default 10px) and --stat-tile-tracking (default 0.08em) from its container, so a narrow grid can trade padding and tracking for room without a new variant.
Accessibility: Rendered as <dl> · screen readers announce "label: value".
CmdLine
| Prop | Type | Default | Required |
|---|---|---|---|
Propcommand | Typestring | Default· | Requiredyes |
Propuser | Typestring | Defaultnone | Requiredyes |
Propprompt | Typestring | Default': | Requiredno |
Propoutput | TypeReactNode | Default· | Requiredno |
PropclassName | Typestring | Default· | Requiredno, merged after the base classes |
Any other div attribute (id, aria-*, data-*) is forwarded to the root element.
SOURCE
<CmdLine user="erik@portfolio" command="cat README.md" />
<CmdLine user="root@prod" prompt="#" command="whoami" output={<span>root</span>} />KbdKey
| Prop | Type | Default | Required |
|---|---|---|---|
Propsize | Type'sm' | 'md' | Default'md' | Requiredno |
SOURCE
<KbdKey>Ctrl</KbdKey>
<KbdKey>+</KbdKey>
<KbdKey>K</KbdKey>
<KbdKey size="sm">Enter</KbdKey>Other <kbd> attributes pass through and className is appended.
Accessibility: Uses semantic <kbd> element.
NavItem
| Prop | Type | Default | Required |
|---|---|---|---|
Prophref | Typestring | Defaultnone | Requiredyes |
Proplabel | TypeReactNode | Defaultnone | Requiredyes |
Propindex | Typestring | Defaultnone | Requiredno |
Propcurrent | Typeboolean | Defaultfalse | Requiredno |
A navigation link. current sets aria-current="location", index is decorative and hidden from assistive technology, and every other anchor attribute passes through.
CopyButton
| Prop | Type | Default | Required |
|---|---|---|---|
Proptext | Typestring | Default· | Requiredyes |
Behavior: Copies text to the clipboard on click. Success shows COPIED for 1.5s. A failed request shows COPY FAILED; missing clipboard access shows COPY UNAVAILABLE. A polite live region announces the result and manual-copy guidance. Consumer button props are forwarded; a consumer click handler can cancel copying with preventDefault().
Panel
| Prop | Type | Default | Required |
|---|---|---|---|
Proptitle | Typestring | Default· | Requiredyes |
Propmarker | Typestring | Default· | Requiredyes |
Propas | Type'div' | 'section' | 'aside' | Default'div' | Requiredno |
ProptitleId | Typestring | Default· | Requiredno |
Propreveal | Typeboolean | Defaultfalse | Requiredno |
Propaction | TypeReactNode | Default· | Requiredno |
whoami
Body content.
SOURCE
<Panel className="w-full" marker="[+]" title="whoami"><p className="m-0 p-4">Body content.</p></Panel>
<Panel className="w-full" as="aside" marker="[~]" title="status" titleId="panel-demo-title" action={<a href="#panel">link</a>}><p className="m-0 p-4">Landmark panel with an action.</p></Panel>A bordered frame on a secondary-950 surface with a faint top glow and a 2px corner radius. The header holds a decorative marker (aria-hidden), the title as an h3 and an optional action node after it. as picks the root element; titleId becomes the heading id and the root's aria-labelledby, which names a section or aside landmark by its title. Other div attributes pass through to the root.
Reveal coupling: reveal only sets data-type-reveal on the heading and suppressHydrationWarning, because the heading text is rewritten after hydration. The scroll typing itself comes from the app-wide TypeReveal island mounted by GlobalMotion in the root layout, which observes every [ element. Without that island the attribute has no effect.
Accessibility: the title is the heading, so give each landmark panel its own titleId.
Styling: the frame rules live in app/. A section that needs a different title size or header layout scopes the change under its own class in its own stylesheet and selects . and ..
Shell and module patterns
These pieces live in components/, not in design-system/. They are documented here because pages outside the home page reuse them.
MenuTrigger
The one control that opens the site menu. It is an icon-only 44px square button (the icon box is --spacing-target divided by --phi twice) named Open menu, with aria-expanded, aria-controls and aria-haspopup="dialog". It is the first control at the left end of the header at every width, with the brand icon alone at the right end, so the menu is in the same place on the home page, / and the design system.
Accessibility: The name comes from aria-label, because the icon carries no text. Focus returns to the trigger when the menu closes.
Position line
Scroll progress is one decorative element, hidden from assistive technology with aria-hidden="true" (the browser scrollbar already conveys the position), restyled by width and fed by --posf (0 to 1).
| Viewport | Shape | Placement |
|---|---|---|
| ViewportFrom 1024px | Shape2px horizontal line | PlacementAcross the top |
| ViewportBelow 1024px | Shape2px vertical line | PlacementLeft edge |
The line does not print and carries no number: no readout of the position appears in any control name.
EqSpectrumStrip
A live spectrum under an EQ curve: log-frequency bars, one curve and an axis. Layers stack in one grid cell and the axis labels sit on grid tracks sized from the frequency positions, so nothing is absolutely positioned. The text alternative states the curve in words.
SOURCE
<div style={{ width: '100%' }}>
<EqSpectrumStrip spectrum={guitarPresentation[SITE_LOCALE.en].eqSpectrum} />
</div>Motion: Bars move on the beat. With the motion switch off, they hold a static level so the shape still reads. Bar height is the only data encoding; position on the axis carries frequency.
Cover frame
The links-thumb class frames a video cover. The frame is always 16:9 and the object-cover image fills it. YouTube serves 4:3 covers with the picture centred between black bars, so a 16:9 frame trims only the bars and nothing of the picture; a cover that is not letterboxed, like the square preview below, is cropped to the frame instead. Colour comes from tokens in theme.: the image is grayscale, then a signal-green layer multiplies over it (--links-thumb-tint). On hover or keyboard focus of the parent link, the layer relaxes to --links-thumb-tint-reveal and the image regains its colour.

SOURCE
<span className="links-thumb" style={{ width: '16rem' }}>
<OptimizedImage src="/images/guitar-live.jpg" alt="" fill sizes="256px" className="object-cover" />
</span>Motion: The reveal fades over --links-thumb-reveal-duration. With the motion switch off, it switches without a transition.
Accessibility: The cover is decorative (alt=""); the link around it carries the video title. No text sits on a cover.
CompanyLink
An external link to a company named in the text. It always opens in a new tab with rel="noopener noreferrer" and announces the new tab to screen readers in the page language ((opens in a new tab) or (abre em uma nova guia), chosen by the required locale prop). When a page already announces the behaviour once, pass describedBy to point at that note instead.
SOURCE
<CompanyLink href="https://www.erikunha.dev" locale={SITE_LOCALE.en}>erikunha.dev</CompanyLink>Accessibility: The hit area grows to --spacing-target-compact without changing the line height.
Composition Patterns
Stat grid using StatTile
Four StatTile components in the ds-stat-row grid: four columns from 1024px, two below, one below 360px. The grid layout stays in the consumer · primitives don't embed layout opinions.
- LH_SCORE
- 99
- YRS_EXP
- 5+
- LCP
- 1.2s
- CLS
- 0
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', border: '1px solid var(--color-primary-subtle)' }}>
<StatTile value="99" label="LH_SCORE" variant="display" />
<StatTile value="5+" label="YRS_EXP" variant="display" />
<StatTile value="1.2s" label="LCP" variant="display" />
<StatTile value="0" label="CLS" variant="display" />
</div>