Skip to content

Coral UI

@get-coral/ui is the shared design-system package for Coral modules. It ships a small set of React components and a CSS custom-property token layer, so Aurora, Fathom, Librarian and the rest look like one family without copying component code between repositories.

It is deliberately small. Components arrive here once a second module needs them, not before.

Terminal window
pnpm add @get-coral/ui
# or
npm install @get-coral/ui

React 19 or newer is a peer dependency (react and react-dom, both >=19).

import { CoralButton, CoralCard } from '@get-coral/ui'
import '@get-coral/ui/styles.css'
export function Example() {
return (
<CoralCard title="Shared UI">
<CoralButton variant="primary">Launch</CoralButton>
</CoralCard>
)
}

The stylesheet is a separate export. Import it once, at your app root.

Every export, as of @get-coral/ui 1.0.2. Each component also exports its props type (CoralButtonProps, CoralCardProps, and so on).

Extends ButtonHTMLAttributes<HTMLButtonElement>.

PropTypeDefault
variant'primary' | 'neutral' | 'danger''neutral'
size'sm' | 'md' | 'lg''md'

Extends HTMLAttributes<HTMLDivElement>. Renders a <section> with an optional header.

PropType
titleReactNode

Extends HTMLAttributes<HTMLElement>. A titled page section.

PropType
eyebrowReactNode
titleReactNode (required)
subtitleReactNode
footerReactNode

Extends HTMLAttributes<HTMLDivElement>. A poster tile with an optional progress bar, clamped to 0–100.

PropType
titleReactNode (required)
subtitleReactNode
descriptionReactNode
imageUrlstring
imageAltstring
badgeReactNode
progressnumber

A full error or empty state with up to two actions. Also exports the CoralErrorAction type.

PropType
titleReactNode (required)
codeReactNode
eyebrowReactNode
descriptionReactNode
primaryActionCoralErrorAction
secondaryActionCoralErrorAction

A CoralErrorAction is { label, href?, onClick?, variant?, target?, rel? }.

Tokens are exposed as CSS custom properties from @get-coral/ui/styles.css, so you can consume them from plain CSS, Tailwind, or inline styles without importing anything else.

@get-coral/ui uses Release Please: push conventional commits to main, and merging the generated release PR publishes to npm. Publishing uses npm trusted publishing (OIDC) with provenance — there is no NPM_TOKEN secret.