@ekanos/ui is the set of Ekanos-styled components available to integrations: the same components the SDK’s widgets are built from, so your UI matches the rest of Ekanos.
Installation
Peer dependencies
You provide these at runtime:react-hook-form and @hookform/resolvers are only needed for form usage, and next-intl for Trans. Everything else the components need at runtime (Base UI, class-variance-authority, clsx, tailwind-merge, cmdk, nanoid) is a declared dependency.
Quick start
Option 1: Use the compiled stylesheet (no Tailwind)
styles.css is self-contained: Tailwind Preflight, design tokens, light and dark mode, and every utility class the components emit. No build step; it works in Next.js, Vite, CRA, a plain <link>, anything. It does not contain utilities for classes you write yourself (p-8, grid-cols-3), and its Preflight is a global reset.
Option 2: Integrate with your Tailwind build
dark: variant, and an @source pointing at the package’s bundles so your Tailwind build generates the components’ utilities. You then get Ekanos tokens in your own classes too. Pick one path: loading both means two copies of every utility.
See Styling for the full paths and trade-offs.
What’s exported
One subpath per component (24 in total), plus four stylesheets:
See Components for the full list and import paths.
No drag and drop, on purpose
@ekanos/ui has no drag-and-drop primitive: no sortable list, no draggable card, no drop target. A widget is a summary of something, and a board that people rearrange belongs on a page, or in the provider’s own app. A widget that needs to reorder or move items should link to such a page instead.
Design tokens
Every component emits Tailwind class strings bound to Ekanos’s semantic design tokens (bg-primary, text-muted-foreground, border-border, shadow-ring, …), so something has to define those — that is what the stylesheets are for.
tokens.css and theme.css carry Ekanos’s full semantic token set — surfaces, brand, status, chart, sidebar, the elevation scale, radius, and fonts — for both themes, so utilities like bg-chart-1 or shadow-ring resolve in your own markup on the Tailwind path. The compiled styles.css is pruned to what the package’s own components use.
See Styling for how to control dark mode and page backgrounds.
Light and dark mode
Dark mode resolves in this order:.darkor[data-theme='dark']ancestor — dark.lightor[data-theme='light']on:root— light@media (prefers-color-scheme: dark)— dark- Default — light
Icon handling
Icon draws Phosphor icons (MIT). The fonts ship inside this package and styles.css declares them, so there is nothing to load. Name icons as phosphoricons.com does (house, caret-down); a name that matches no icon draws shapes.
See Fonts & Icons for the full setup.
Runtime notes
- Base UI, not Radix — popups use
@base-ui/react; noasChildprop, userenderinstead Transneeds next-intl — renders against the host’s messages; must run under aNextIntlClientProviderSpinneris self-contained — draws an SVG, no icon font needed- Client components are marked —
'use client'is preserved in each client entry’s bundle - Server-safe entries —
alert,badge,button,card,input,textarea,skeleton,if,spinner, andutilscarry no directive