Skip to main content
The design module is the front-end design system: a type: "design" module under modules/<name>/, published as @module/<name> and consumed primarily by the Single Page App. Its src/ ships ready-made building blocks so you compose UI instead of writing ad-hoc markup: components/ (React primitives), hooks/ (presentation hooks), icons/ (SVG sets), fonts/ (bundled web fonts), styles/ (global stylesheets and tokens), and utils/ (class-name helpers). This page walks through using each asset kind. It is not part of the backend pipeline; see the overview for what it is and the structure for how it is laid out.
Exact import paths and component props depend on your skeleton-design source. The examples below are illustrative, so always consult the actual components in modules/<name>/src/ for the real API.

Composing components

components/ holds React (.tsx) UI primitives, one folder per grouping that collects its variants. For example, button/ contains Button.tsx, ButtonSave.tsx, and friends. There are around fifty: accordion, avatar, badge, button, card, dialog, form, input, select, table, tabs, tooltip, and more. Compose these primitives rather than reinventing markup or duplicating their internals. Import the pieces you need and assemble a screen:
Reach for a purpose-built variant (such as ButtonSave) when one exists instead of re-implementing its behavior on a base Button.

Using hooks

hooks/ provides reusable React hooks for presentation-layer concerns: state, DOM, and events. The set includes useClickOutside, useMobile, useControlledState, and useAutoHeight. Keep data-fetching and domain logic out of these hooks; that work belongs in services. Use useClickOutside to dismiss a transient surface like a dropdown:
Use useMobile to branch on viewport for responsive behavior:

Using icons

icons/ ships SVG icons organized by variant, category, and size, so the path is icons/<variant>/<category>/<size>/<IconName>.tsx. Variants are fill/ and outline/, sizes are sm, md, and lg, and each icon is its own component file (for example icons/fill/accessibility/lg/AccessibilityLiftIcon.tsx). Import the specific icon you need rather than pasting inline SVG into your components.
The size lives in the import path, not in a prop, so pick it by importing from the matching sm/md/lg folder. Choose outline for neutral, interface-level affordances and fill for emphasis or active states, and keep sizes consistent within a control by importing its icons from the same size folder.

Fonts and styles

fonts/ bundles the web fonts (Space Grotesk) with their @font-face declarations. Reference the bundled fonts, never an external font CDN, so typography stays self-contained and offline-safe. styles/ holds the global stylesheets: app.css, brand.css, shape.css, status.css, and typography.css. Import them once at the app entry point and edit them for app-wide tokens, themes, and base styling.
Change a token in one place (brand.css for colors, typography.css for type scale, shape.css for radii) and every component that reads it updates with it.

Merging class names with cn

utils/ carries front-end helpers: cn (class-name merge) and staleChunk. Use cn to compose conditional and overriding class names cleanly instead of hand-built string concatenation:
Accepting a className prop and merging it with cn lets callers override styling without you forking the component.

Working with the design module

Build screens by composing existing primitives and their variants, and never copy a component’s internals into your own markup. Keep hooks generic: presentation state, DOM, and events belong in them, while data-fetching and domain logic stay in services. Reach for the provided assets too, picking a fill or outline icon at a standard size and referencing the bundled Space Grotesk fonts instead of inline SVG or external CDNs. Put colors, type scale, shape, and status tokens in the styles/ files so a change propagates from one place. None of this is the home for business logic; the design module is presentation only, and domain rules and data access live elsewhere in the stack. Accept a className prop and merge it with cn so consumers can extend styling without forking a component. And since import paths and props follow the skeleton-design source, confirm the real API by reading the components in modules/<name>/src/.