Build once, use anywhere. UnityKit is a framework-agnostic component library that provides beautiful, accessible UI components that work seamlessly across React, Vue, Angular, Svelte, and vanilla JavaScript.
Modern web development is fragmented across frameworks, but your component library shouldn't be. UnityKit solves this by providing:
npm install @unitykit/core
# or
yarn add @unitykit/core
# or
pnpm add @unitykit/core
# React
npm install @unitykit/react
# Vue
npm install @unitykit/vue
# Angular
npm install @unitykit/angular
# Svelte
npm install @unitykit/svelte
# Solid
npm install @unitykit/solid
<script type="module">
import { defineAllComponents } from 'https://cdn.jsdelivr.net/npm/@unitykit/core@latest/dist/core.esm.js';
defineAllComponents();
</script>
/* In your main CSS file */
@import '@unitykit/core/dist/styles.css';
React:
import { Button, Card, Input } from '@unitykit/react';
function App() {
return (
<Card>
<Input label="Email" placeholder="[email protected]" />
<Button variant="primary">Submit</Button>
</Card>
);
}
Vue:
<template>
<UnityCard>
<UnityInput label="Email" placeholder="[email protected]" />
<UnityButton variant="primary">Submit</UnityButton>
</UnityCard>
</template>
<script setup>
import { UnityButton, UnityCard, UnityInput } from '@unitykit/vue';
</script>
Angular:
import { UnityKitModule } from '@unitykit/angular';
@NgModule({
imports: [UnityKitModule],
})
export class AppModule {}
<unity-card>
<unity-input label="Email" placeholder="[email protected]"></unity-input>
<unity-button variant="primary">Submit</unity-button>
</unity-card>
Vanilla JS:
<script type="module">
import { defineAllComponents } from '@unitykit/core';
defineAllComponents();
</script>
<unity-card>
<unity-input label="Email" placeholder="[email protected]"></unity-input>
<unity-button variant="primary">Submit</unity-button>
</unity-card>
UnityKit includes a comprehensive set of production-ready components:
// Same component, different frameworks
<Button /> // React
<unity-button></unity-button> // Vue/Angular/HTML
<Button /> // Svelte
/* Customize globally */
:root {
--unity-primary: #4f46e5;
--unity-border-radius: 8px;
--unity-font-family: 'Inter', sans-serif;
}
/* Or use dark mode */
[data-theme='dark'] {
--unity-bg-primary: #0f172a;
--unity-text-primary: #f8fafc;
}
import type { ButtonProps } from '@unitykit/core';
// Full type safety for all components
const props: ButtonProps = {
variant: 'primary',
size: 'medium',
disabled: false,
};
<!-- All components include proper ARIA attributes -->
<unity-button aria-label="Submit form" role="button">
Submit
</unity-button>
Explore our comprehensive documentation:
# Clone the repository
git clone https://github.com/unitykit/unitykit.git
# Navigate to docs
cd unitykit/docs
# Install dependencies
npm install
# Start documentation server
npm run docs:dev
// theme.config.js
export default {
colors: {
primary: '#4f46e5',
secondary: '#10b981',
danger: '#ef4444',
},
spacing: {
unit: 8,
},
typography: {
fontFamily: "'Inter', 'Segoe UI', sans-serif",
},
};
// Next.js example
import { UnityKitProvider } from '@unitykit/react';
function MyApp({ Component, pageProps }) {
return (
<UnityKitProvider ssr>
<Component {...pageProps} />
</UnityKitProvider>
);
}
// React Hook Form example
import { useForm } from 'react-hook-form';
import { Input, Button } from '@unitykit/react';
function LoginForm() {
const { register, handleSubmit } = useForm();
return (
<form onSubmit={handleSubmit(data => console.log(data))}>
<Input
{...register('email', { required: true })}
label="Email"
type="email"
/>
<Button type="submit">Login</Button>
</form>
);
}
// i18n setup
import { i18n } from '@unitykit/core';
i18n.configure({
locale: 'fr',
messages: {
'button.submit': 'Soumettre',
'input.placeholder': 'Tapez quelque chose...',
},
});
We love contributions! Here's how you can help:
# 1. Fork the repository
# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/unitykit.git
# 3. Create a branch
git checkout -b feature/amazing-component
# 4. Install dependencies
npm install
# 5. Start development server
npm run dev
# 6. Make your changes and commit
git commit -m 'feat: add amazing component'
# 7. Push to your fork
git push origin feature/amazing-component
# 8. Open a Pull Request
# Install dependencies
npm install
# Build all packages
npm run build
# Run tests
npm test
# Run Storybook for development
npm run storybook
# Run linter
npm run lint
| Package | Version | Status | Downloads |
|---|---|---|---|
@unitykit/core |
✅ Stable | ||
@unitykit/react |
✅ Stable | ||
@unitykit/vue |
✅ Stable | ||
@unitykit/angular |
🔄 Beta | ||
@unitykit/svelte |
✅ Stable | ||
@unitykit/solid |
🔄 Beta |
UnityKit is released under the MIT License.
Support the development of UnityKit through GitHub Sponsors.
[Your logo here]
[Your logo here]
UnityKit stands on the shoulders of giants:
Made with ❤️ for the web community.