Ansora UI
Setup

Ansora base

Tokens, icons and shared helpers. Install this first — every other item assumes it is already there.

base

Install

pnpm dlx shadcn@4.23.0 add @ansora/base

Examples

This item installs setup — tokens, CSS and conventions — not a component, so there is nothing to render.

Usage

globals.css takes exactly two lines, in this order: @import "tailwindcss"; and @import "@ansora/tokens";. Without the first one not a single utility is generated.

next.config: add transpilePackages: ["@ansora/tokens", "@ansora/core"] — the packages ship TypeScript sources, so Next will not compile them otherwise.

app/layout.tsx: set . Everything this registry renders is Czech, so the lang="en" that create-next-app leaves behind fails WCAG 3.1.1 (level A) on every page of every consumer — a screen reader then pronounces Czech with English phonetics.

app/layout.tsx : add a blocking inline script that applies the stored theme before the first paint. DashboardActions can only read the preference in a mount effect (reading it during render would desync SSR and hydration), which leaves one frame of the wrong theme after every reload. Only a script in the document head closes that gap, and the document belongs to your layout, not to a component:

Files

    Dependencies

    • @ansora/conventions
    • @ansora/tokens (npm)
    • @ansora/core (npm)
    • @phosphor-icons/react@^2.1.10 (npm)

    On this page