<kebab>.yml declares type: "design". It carries your design system — React components, hooks, icons, fonts, styles, and front-end utilities — and is shared across applications. Unlike a normal module, a design module is not registered into AppModule or SharedModule; nothing imports it as a runtime feature. Its src/ is not scaffolded from a generator either — it comes from the upstream skeleton-design repository, so the layout below is fixed and canonical.
Layout
A design module lives undermodules/<kebab-name>/. It keeps the base module files but drops the runtime <Pascal>Module.ts, and its src/ is organized by asset kind:
Module-level files
These live at the module root, the same as any module — see Module structure for the shared conventions.| File | What it is |
|---|---|
<kebab>.yml | Module manifest. Declares type: "design", which marks the module as a design system rather than a runtime feature. |
package.json | Names the package @module/<kebab> so other modules can depend on it. |
tsconfig.json | TypeScript configuration for the module. |
<Pascal>Module.ts (and no matching spec). A design module has no runtime entry class to register — the scaffolded module file is removed because the src/ content is provided by skeleton-design, not generated locally.
The src/ folders
Each folder under src/ holds one kind of asset. Stay within these conventions when adding to a design module.
| Folder | What it holds | Conventions |
|---|---|---|
components/ | Reusable React (.tsx) UI — roughly 50 components such as accordion, avatar, badge, button, card, dialog, form, input, select, table, tabs, tooltip. One folder per component, grouping its variants. | Compose these primitives rather than writing ad-hoc markup or duplicating their internals. |
hooks/ | Shared presentation-layer React hooks — useClickOutside, useMobile, useControlledState, useAutoHeight. | Keep them generic (state, DOM measurement, events). Domain and data-fetching logic belongs in services, not here. |
icons/ | SVG icons in fill/ and outline/ variants, grouped by category and size (sm, md, lg). | Choose the right variant and size. Add new icons to the matching category folder — never inline SVG into components. |
fonts/ | Bundled web fonts (Space Grotesk) with their @font-face CSS. | No external CDNs. Add new font files here together with their CSS. |
styles/ | Global stylesheets — app.css, brand.css, shape.css, status.css, typography.css — for app-wide tokens, themes, and base styling. | Prefer shared styles plus component-scoped classes over one-off CSS. |
utils/ | Front-end helpers — cn (class-name merge) and staleChunk. | Small, pure presentation helpers only. No backend or business logic. |
The component-variant pattern
A component folder groups a primitive with its variants. Thebutton/ folder, for example, holds the base Button.tsx alongside variants like ButtonSave.tsx:
Next steps
- Design system overview — what a design module is and where it comes from.
- Using a design module — depending on
@module/<kebab>and consuming its assets. - Creating a design module — pulling
skeleton-designinto a new module. - Module structure — the shared module-level conventions.
- SPA overview — where these components are rendered.