Open-source React component library: the full shadcn/ui (New York) set on an OKLCH design-token system, plus a handful of blocks and application shells built on top of it. The default palette is Akira purple. Swap it for your own brand with a single CSS import, no component code changes required.
bun add @akira-io/ui# npm
npm install @akira-io/ui
# pnpm
pnpm add @akira-io/ui
# yarn
yarn add @akira-io/uiTo track unreleased work, install the main-dist branch:
bun add github:akira-io/ui#main-distmain-dist is rebuilt from main on every push and carries the compiled dist, so the install needs no
build step of its own. Install from main instead and nothing resolves: dist is not in the repository,
and the package builds correctly only from a checkout, not from inside node_modules.
Use a published version in production and main-dist only where you want the latest components before a
release. The branch is force-pushed, and each build replaces the previous commit rather than building on it,
so the branch itself is a moving target.
To pin one build, install its tag. Every build is also tagged dist-<sha>, after the first seven characters
of the main commit it was built from, and a tag is never moved once pushed, so a lockfile that records it
keeps installing the same tree. Replace SHA with the seven characters of the main commit you want:
bun add github:akira-io/ui#dist-SHATags start with the first build after this was added; main-dist commits from before then are not pinnable.
Peer dependencies: react and react-dom, 18 or 19. @inertiajs/react ^2.1.2 || ^3.0.0 is only needed if
you import from the /inertia entry point; recharts, @tanstack/react-table and react-hook-form are only needed
for the /charts, /data-table and /form entry points. None of them is required for the primitives, the blocks,
or the generic shells.
Import the tokens once, in your app's main CSS:
@import 'tailwindcss';
@plugin 'tailwindcss-animate';
@import '@akira-io/ui/theme.css';
@source '../../node_modules/@akira-io/ui/dist';tailwindcss-animate generates the animate-in / fade-in / zoom-in utility classes several components
use for enter and exit transitions (dialogs, dropdowns, tooltips). @source points Tailwind at the compiled
package output so those utility classes are not purged.
No configuration is required to get the default Akira purple palette: theme.css sets --primary from the
Akira ramp in both light and dark mode.
Import a brand preset after theme.css and set data-brand on <html>:
@import '@akira-io/ui/theme.css';
@import '@akira-io/ui/themes/nosferry.css';<html data-brand="nosferry"></html>themes/nosferry.css ships today as the worked example: it declares the required --primary /
--primary-foreground pair and the optional --destructive / --destructive-foreground pair for both
light and dark mode, eight declarations in total, scoped to [data-brand='nosferry']. Every preset must
declare the primary pair in both schemes; it may add the destructive pair only as a complete pair in both
schemes. Write your own preset the same way and ship it alongside your app; omitting data-brand renders
Akira purple.
import { Button, Card, cn } from '@akira-io/ui';
export function Example() {
return (
<Card>
<Button className={cn('gap-2')}>Continue</Button>
</Card>
);
}The package is framework-agnostic at its core: the primitives and the tokens work in any React app (Inertia, Next.js, plain Vite). Only the application shells need a router, and they take it as a prop rather than importing one.
| Import | Contents |
|---|---|
@akira-io/ui |
56 React components + cn (zero framework coupling) |
@akira-io/ui/blocks |
8 higher-level blocks: command palette, stat cards, settings cards, tour, and more |
@akira-io/ui/shells |
12 application shell pieces: sidebar, header, nav, settings layout; take a polymorphic linkComponent prop |
@akira-io/ui/shells/server |
The sidebar_state cookie reader, safe to call from a server component or an SSR handler |
@akira-io/ui/inertia |
The same shells with the Inertia Link and usePage().url pre-bound |
@akira-io/ui/theme.css |
The design tokens |
@akira-io/ui/themes/*.css |
Brand presets (nosferry.css ships as the example) |
@akira-io/ui/locales/pt |
Portuguese labels for the components that take them, as a typed object to spread |
@akira-io/ui/locales/fr |
French labels, same shape as the Portuguese bundle |
@akira-io/ui/locales/es |
Spanish labels, same shape as the Portuguese bundle |
Component text defaults to English. To render an app in Portuguese, hand the bundle to the locale provider once, at the root; every localized component reads it, and a prop still wins on the screen that needs it:
import { UiLocaleProvider } from '@akira-io/ui';
import { ptLabels } from '@akira-io/ui/locales/pt';
<UiLocaleProvider labels={ptLabels}>
<App />
</UiLocaleProvider>;Dates follow a separate dateLocale, any date-fns locale (or one from react-day-picker/locale). Calendar,
DatePicker, DateRangeFilter and the DateFilter block format their weekdays, months and triggers with it,
and a locale prop on a single Calendar still wins. Without it the components stay in English, except the
DateFilter block, which keeps Portuguese:
import { pt } from 'date-fns/locale';
<UiLocaleProvider labels={ptLabels} dateLocale={pt}>
<App />
</UiLocaleProvider>;Numbers the components format themselves, the trend and share percentages of StatCard, StatBreakdownCard
and CompositionBar, follow a separate locale, any BCP 47 tag. Without it they stay in en-US:
<UiLocaleProvider labels={ptLabels} dateLocale={pt} locale="pt-PT">
<App />
</UiLocaleProvider>;Full documentation starts at docs/00-index.md:
The hosted documentation and live component preview are available at ui.akira-io.com.
bun run testRelease notes are generated from conventional commits via git-cliff when a
vX.Y.Z tag is pushed (see cliff.toml and .github/workflows/release.yml). CHANGELOG.md appears in the
repository after the first tagged release.
Please see CONTRIBUTING.md for details.
Please review SECURITY.md for how to report a vulnerability.
MIT. See LICENSE.