Documentation / getting started
Install the project, learn the token contract, and compose the accessible components in your own product surface.
01
Install and run locally
Clone the repository, install the dependencies, and start the Next.js development server.
git clone <repository-url>
cd design-system-use-case
npm install
npm run dev
The documentation opens at http://localhost:3000. Use the component pages to inspect the live examples and their implementation tabs.
02
Use a component in a page
Import the component and its inner parts from the source folders. The current project uses the @/* alias for src/*.
import { Button } from "@/components/buttons/Button";
import { Card, CardBody } from "@/components/cards/Card";
import { semanticTokens } from "@/data/tokens";
export function ProjectActions() {
return (
<Card>
<CardBody>
<Button variant="primary">Create project</Button>
</CardBody>
</Card>
);
}
03
Use semantic tokens
Build component styles from semantic intent instead of hard-coded palette values. This lets the visual theme evolve without changing component APIs.
/* Prefer semantic roles in component styles. */
.component {
color: var(--color-content-primary);
background: var(--color-surface-subtle);
border-color: var(--color-border-default);
}
content
Text and icon roles.
surface
Canvas and grouping roles.
action
Interactive emphasis roles.
04
Keep the accessibility contract
- Use native buttons for actions and links for navigation.
- Keep visible focus states and test the keyboard path.
- Use semantic table markup for genuinely tabular data.
- Do not communicate state with color alone.