Skip to main content

Form controls

Button

Input

Textarea

Select

Switch

Label

Form (with react-hook-form)

Layout & containers

Card

Dialog

Status & feedback

Badge

StatusBadge

One neutral outlined pill with a colored dot, for record states (“Active”, “Failed”, “Pending”). The label carries the meaning; the dot confirms it, so the pill reads the same to a color-blind viewer.
It accepts every Badge prop except variant, and exports the StatusTone type.

Stat

A headline figure: a small uppercase label, the figure in the heading face with its change beside it, and one muted line of context.
StatChange’s tone ('positive' | 'negative' | 'neutral') is the reading, not the direction: expenses falling is positive. A trend icon pairs with the color so the tone never rides on color alone; pass icon (a Phosphor icon name) to use a different glyph.

Avatar

A person’s picture, or their initials when there is none. PersonAvatar derives the initials from name; the parts (Avatar, AvatarImage, AvatarFallback) are there for a shape it does not cover.
size is sm (24px), default (32px) or lg (40px). Initials are the first letter of the first and last words of name (one letter for a single word). PersonAvatar is announced as an image named by alt, or by name when alt is not set. initialsFromName(name) is exported if you need the same letters elsewhere.

Alert

Skeleton

Spinner

EmptyState

Emptiness that owns the whole surface: a dashed, centred panel with optional media, a heading, one line of text and at most one action. It carries its own padding, so don’t add any. For an empty card or section on a page that has other content, use EmptyNote (@ekanos/ui/empty-note), whose title takes any ReactNode. Inside a widget, use the SDK’s Widget.Empty.
The parts render in the order you write them: media, heading, text, action. EmptyStateButton takes every Button prop. A className on EmptyState overrides its padding when a panel must be tighter. It has no hooks, so it renders from a Server Component.

Charts

Three small charts for a widget, drawn as plain SVG and markup with no chart library and no animation. Colour comes from the theme’s chart tokens through tone (chart-1 to chart-5, up, down), so a Source’s theme and dark mode reach them. Each is announced as one image: pass a label saying what it shows, and its figures are added for you.
  • Sparkline draws a line (or variant="area") over values, oldest first, with no axes. It fills the box its class gives it, h-8 w-24 by default. An empty series draws nothing; one value, or all equal values, is a flat line.
  • ProgressRing fills clockwise in proportion to value over max (default 100), clamped between empty and full; a max of zero is empty. It shows the rounded percentage, or your children. Size it with a size-* class, size-16 by default.
  • BarSeries draws labelled bars in columns (orientation="vertical", the default) or rows, sharing one scale that includes zero. A negative value grows the other way and takes the down tone. formatValue formats the figures; each bar can set its own tone.
Use them for a glance, not for reading values off an axis.

Tables

DataTable

The house table: records compared across columns, with sorting, paging and row clicks. For a list scanned by one primary line, use rows. For a few static facts, use Table from @ekanos/ui/table.
DataTable is a client component. Its labels go through Trans, so it needs the NextIntlClientProvider that Ekanos and the harness already mount. Column pinning, resizing, column visibility and row selection are not in the partner table yet.

Overlays & menus

Tooltip

Separator

Page structure

@ekanos/ui/page ships the page shape the host’s own pages use, so a partner page does not hand-roll chrome. A page composes the parts in this order:
These primitives use route links from next/link, so render them inside a Next app (the harness provides one).

Utilities

Icon (Phosphor)

name is a Phosphor icon name (e.g. house; star:fill for a filled state). Any other value falls back to shapes. See Fonts & Icons for icon styles and sizing.

If (conditional rendering)

Trans (i18n with next-intl)

A client component that must render under a NextIntlClientProvider (it throws without one). A key resolves to the host’s message when it exists; otherwise defaults (interpolated), then children, then the key itself.

Utils

AI surfaces

PromptInput

onSubmit receives { text, files } and the form event. The entry also exports attachment, action-menu, select, hover-card, tab, and command parts (PromptInputActionMenu, PromptInputSelect, PromptInputCommand, …). Its ChatStatus and FileUIPart types come from the ai package, which is imported for types only.

Styling imports

Stylesheets

See Styling.

TypeScript

Every entry ships type declarations. A few prop types are exported by name, for example:
For components without a named props type, use React.ComponentProps<typeof Input>. Props extend the underlying element’s props, so standard attributes work: