Skip to content
  • InstallationGuideCLI, shadcn, npm, React and Next.js
  • ThemingGuideThe theme contract, every token, writing a theme
  • ButtonActions & displayActions. Default, primary, ghost and danger, in three sizes, plus a square icon button.
  • BadgeActions & displayShort status labels and tags, in status colours or the theme’s six palette colours.
  • AvatarActions & displayA photo or initials in a palette colour, in three sizes, and a stacked group.
  • CardActions & displayThe raised surface for grouped content, with header, body and footer slots and six palette tints.
  • SurfaceActions & displayThe three materials every theme defines: raised, inset and overlay. Build your own components on them.
  • InputFormsText fields and textareas with a visible label, hint and invalid state.
  • SelectFormsA styled native <select>: keyboard, mobile pickers and screen readers work for free.
  • Checkbox and radioFormsNative checkboxes and radios, restyled, including the indeterminate state and radio groups.
  • SwitchFormsAn on/off setting that applies at once: a checkbox with role="switch".
  • SliderFormsA native range input whose filled track follows the thumb.
  • Dialog and drawerOverlaysModal <dialog>: the browser traps focus, handles Esc and returns focus to the trigger. Drawers slide from an edge.
  • Popover and menuOverlaysNative popover API (light dismiss, Esc, top layer), placed next to its trigger. A menu is a popover with role="menu".
  • TooltipOverlaysA CSS-only label on hover and keyboard focus. Esc hides it.
  • ToastFeedbackNotifications in one polite live region; errors use role="alert". They pause while hovered or focused.
  • AlertFeedbackInline messages in four tones.
  • ProgressFeedbackA native <progress>; leave out value for an indeterminate bar.
  • SkeletonFeedbackPlaceholders while content loads.
  • TabsNavigation & dataWAI-ARIA tabs with automatic activation and roving focus.
  • AccordionNavigation & dataNative <details>: works without JavaScript. The same name keeps one item open.
  • TableNavigation & dataData tables that scroll sideways on small screens; compact density tightens rows.
  • PaginationNavigation & dataPage links in a labelled nav with the current page marked.

Actions & display

Badge

Short status labels and tags, in status colours or the theme’s six palette colours.

Status

Paid Pending Overdue Draft Pro
html
<span class="og-badge og-badge--success">Paid</span>
<span class="og-badge og-badge--warning">Pending</span>
<span class="og-badge og-badge--danger">Overdue</span>
<span class="og-badge og-badge--accent">Draft</span>
<span class="og-badge og-badge--accent og-badge--solid">Pro</span>

Palette

Design Marketing Finance Ops Research Support
html
<span class="og-badge og-badge--1">Design</span>
<span class="og-badge og-badge--2">Marketing</span>
<span class="og-badge og-badge--3">Finance</span>
<span class="og-badge og-badge--4">Ops</span>
<span class="og-badge og-badge--5">Research</span>
<span class="og-badge og-badge--6">Support</span>

React

tsx
import { Badge } from '@og-ui/react';

<Badge variant="success">Paid</Badge>
<Badge variant={3}>Finance</Badge>
<Badge variant="accent" solid>Pro</Badge>

In every theme

Clean SaaS

Paid Pending Overdue Draft Pro

Glassmorphism 2.0

Paid Pending Overdue Draft Pro

Liquid glass

Paid Pending Overdue Draft Pro

Neumorphism / Soft UI

Paid Pending Overdue Draft Pro

Claymorphism

Paid Pending Overdue Draft Pro

Neubrutalism

Paid Pending Overdue Draft Pro

Aurora / mesh gradient

Paid Pending Overdue Draft Pro

Keyboard and screen readers

  • Not focusable. Don’t make a badge the only way to tell a state: say it in text too.
  • --solid is meant for --accent; other colours with --solid aren’t contrast-checked.

Install

bash
npx @og-ui/cli add badge
npx @og-ui/cli add badge --react   # with the React component