Introduction
Welcome to the developer documentation for our design system. This guide will help you understand the architecture and get started quickly.
Installation
Install the package via npm:
npm install our-design-system
Quickstart
Here's a basic example of using a button component:
javascript
import { Button } from 'our-design-system'
function App() {
return (
<Button variant="primary">Click me</Button>
)
}
Components
All components are built with accessibility in mind.
Note
Components are tree-shakable, so you only bundle what you use.
Theming
Customize the look and feel with CSS variables:
:root {
--color-primary: #3b82f6;
--color-background: #ffffff;
}
Warning
Overriding variables globally may affect all components. Test thoroughly.
Accessibility
Our components follow WAI-ARIA guidelines.
Danger
Do not remove focus indicators. They are essential for keyboard users.
useButton
A hook for creating accessible button behavior.
import { useButton } from 'our-design-system'
const { buttonProps } = useButton({ onClick: () => {} })
useInput
Hook for form input handling with validation.
useToggle
A simple toggle state hook.