@sswconsulting/design-system
v0.3.0
Published
SSW Design System component library built with React, Storybook, and Tailwind CSS.
Maintainers
Readme
SSW Design System
A React component library powered by Storybook, Tailwind CSS, and shadcn-style primitives.
Goals
- Provide a consistent UI foundation across SSW projects.
- Keep component behavior and visual standards documented in Storybook.
- Ship reusable components that consumer apps can install.
Tech stack
- React 19 + TypeScript
- Vite
- Storybook 10
- Tailwind CSS 4
- Biome
- Chromatic
Getting started
pnpm install
pnpm storybookScripts
| Script | Purpose |
| --- | --- |
| pnpm dev | Run local Vite app playground |
| pnpm storybook | Run Storybook |
| pnpm storybook:build | Build Storybook static output |
| pnpm storybook:test | Run Storybook Vitest project |
| pnpm lint | Run Biome checks and apply safe fixes |
| pnpm format | Format repository with Biome |
| pnpm chromatic | Publish Storybook to Chromatic |
| pnpm changeset | Create a versioning/changelog entry |
| pnpm version-packages | Apply pending changesets to package version/changelog |
| pnpm release | Publish package(s) to npm via Changesets |
Story organization
src/stories/ui/atoms/*.{stories.tsx,mdx}: base UI primitive stories/docs mapped fromsrc/components/ui.src/stories/ui/molecules/*.{stories.tsx,mdx}: composed components built from atoms.src/stories/ui/organisms/*.{stories.tsx,mdx}: larger feature-level sections (for example Login blocks).src/stories/foundations/*.stories.tsxand*.mdx: design tokens and system-level guidance.- Story titles follow:
Foundations/...UI/Atoms/...UI/Molecules/...UI/Organisms/...
What are foundational stories?
Foundational stories document system-wide rules rather than one component API. They include tokens (color, spacing, typography), theme behavior, accessibility rules, and composition guidelines shared across many components.
Component boundaries
src/components/ui: reserved for generated/vendor-style shadcn primitives. Avoid manual edits here.src/components: custom SSW components and wrappers.src/components/ssw(recommended): shared SSW abstractions built on top ofsrc/components/ui.- If you need styling or behavior changes to a primitive (for example
Buttonvariants), build a wrapper component insrc/components/sswrather than modifyingsrc/components/ui/button.tsx.
Chromatic token setup
- Copy
.env.exampleto.env. - Set
CHROMATIC_PROJECT_TOKENin.envfor local publishing. - Set
CHROMATIC_PROJECT_TOKENas a GitHub Actions repository secret for CI publishing.
Release workflow (Changesets)
This package is published through a Changesets-driven release PR workflow.
- After code changes, run
pnpm changeset. - Choose
patch,minor, ormajor. - Write a consumer-facing changelog summary.
- Commit the generated
.changeset/*.mdfile with your change. - Merge your feature PR to
main. - GitHub Actions creates or updates a Release PR containing version/changelog updates.
- Merge the Release PR to apply version/changelog updates.
Publishing status
- Publishing is currently disabled (
"private": trueinpackage.jsonand no publish step in.github/workflows/release.yml). - Re-enable publishing only after deciding the private registry target and token strategy.
Team workflow
- Build wrappers/custom components in
src/componentsorsrc/components/ssw. - Add or update
*.stories.tsxinsrc/stories/ui/*orsrc/stories/foundations. - Add or update an MDX page for each component in the same
src/stories/ui/*level. - Verify docs and controls in Storybook.
- Run
pnpm lintandpnpm storybook:test. - Create and commit a changeset (
pnpm changeset) for user-facing changes. - Open a PR and rely on Chromatic for visual review.
Using with AI agents
The design system ships an agent skill (skills/ssw-design-system/) that teaches
AI coding agents (Claude Code, claude.ai, etc.) how to integrate the system into a
consuming project — choosing between the npm package and the shadcn registry,
wiring styles and fonts, and theming via tokens.
The skill is a single self-contained markdown file (easy to inspect before use), published on the public docs site (no repo access needed):
- Skill:
https://design.ssw.com.au/skill/SKILL.md - Packaged for claude.ai:
https://design.ssw.com.au/skill/ssw-design-system.skill
Ways to use it:
- Zero-install (any agent with web access) — paste this to the agent:
Set this project up with the SSW design system. Fetch and follow https://design.ssw.com.au/skill/SKILL.md
- Claude Code: save
SKILL.mdinto the project's.claude/skills/ssw-design-system/(or~/.claude/skills/…for all projects). - claude.ai / Cowork: upload the
.skillfile (Settings → Capabilities → Skills) — it's a zip of the same singleSKILL.md, packaged because the upload requires that format.
