Installation
Installation
Installation
Install PrimitiveKit for your framework of choice. All packages are available on NPM.
Choose Your Framework
React
npm install @primitivekit/reactUsage:
import { Button, Card } from '@primitivekit/react';
import '@primitivekit/react/tokens/tokens.css';
function App() {
return (
<Card variant="elevated">
<Button>Click Me</Button>
</Card>
);
}Requirements:
- React 18.0.0 or higher
- TypeScript 5.0.0 or higher (optional)
Import Design Tokens
All frameworks require importing the design tokens CSS file:
import '@primitivekit/{framework}/tokens/tokens.css';This file contains 600+ CSS variables that power all components. You only need to import it once in your application’s entry point.
Tree Shaking
All packages support tree shaking. Import only the components you need:
// ✅ Good - Only imports Button
import { Button } from '@primitivekit/react';
// ❌ Avoid - Imports everything
import * as PrimitiveKit from '@primitivekit/react';TypeScript Support
All packages include TypeScript definitions. No additional @types packages needed.
import type { ButtonProps } from '@primitivekit/react';
const props: ButtonProps = {
variant: 'primary',
size: 'medium',
disabled: false
};Version Compatibility
| Framework | PrimitiveKit Version | Status |
|---|---|---|
| React | 0.2.1 | ✅ Production Ready |
| Vue | 0.1.0 | ✅ Ready |
| Angular | 0.1.0 | ✅ Ready |
| Svelte | 0.1.0 | ✅ Ready |
| Astro | 0.1.0 | ✅ Ready |
| Vanilla JS | 0.1.0 | ✅ Ready |
Next Steps
- Quick Start Guide - Get up and running in 5 minutes
- Customization - Learn how to customize components
- Design Tokens - Explore the token system
- Components - Browse all available components
Need Help?
- GitHub Issues - Report bugs or request features
- GitHub Discussions - Ask questions and share ideas
- NPM - View package details