Skip to content
Installation

Installation

Installation

Install PrimitiveKit for your framework of choice. All packages are available on NPM.

Choose Your Framework

React

npm install @primitivekit/react

Usage:

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)

View React Documentation →

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

FrameworkPrimitiveKit VersionStatus
React0.2.1✅ Production Ready
Vue0.1.0✅ Ready
Angular0.1.0✅ Ready
Svelte0.1.0✅ Ready
Astro0.1.0✅ Ready
Vanilla JS0.1.0✅ Ready

Next Steps

Need Help?