Installation
Install a package, import the styles, then import components or copy their source with the CLI.
#Requirements
- React 18 or 19 (
reactandreact-domare peer dependencies). - Any bundler that can import CSS files: Vite, Next.js, Remix and so on.
- TypeScript is optional. Packages ship type declarations; the CLI copies TSX source.
#1. Install a package
Install the package of the section a component belongs to. You need it even if you plan to copy source with the CLI: copied components import the shared runtime (hooks and utilities) from the package.
@elyri/motion
pnpm add @elyri/motion@elyri/ui
pnpm add @elyri/ui#2. Import the styles
Import styles.css once at your app entry. It defines the global design tokens (durations, easings, colours); each component loads its own styles alongside it.
main.tsx
// main.tsx: import only the packages you use
import '@elyri/motion/styles.css';
import '@elyri/ui/styles.css';#3. Use a component
Option A: import from the package
The quickest route when you do not need to change the source.
Hero.tsx
import { GradientText } from '@elyri/motion';
import { Button } from '@elyri/ui';
export function Hero() {
return (
<>
<GradientText>Hello Elyri</GradientText>
<Button>Get started</Button>
</>
);
}Option B: copy the source with the CLI
The component source lands in your project, ready to edit. You can add several components at once.
pnpm dlx @elyri/cli@latest add gradient-textHero.tsx
// The CLI writes to src/components/elyri by default (or under your @/* alias)
import { GradientText } from './components/elyri/GradientText';
export function Hero() {
return <GradientText>Hello Elyri</GradientText>;
}Every component page has a Code tab with its install command and usage, reflecting the props you tuned.