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.

Feedback

Toast

Notifications in one polite live region; errors use role="alert". They pause while hovered or focused.

Trigger a toast

html
<button class="og-button" onclick="window.ogToast?.('Invoice sent', { variant: 'success', description: 'Acme Ltd will get it in a minute.' })">Success toast</button>
<button class="og-button" onclick="window.ogToast?.('Payment failed', { variant: 'danger', description: 'The card was declined.' })">Error toast</button>

React

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

const toast = useToast();
toast('Invoice sent', { variant: 'success', description: 'Acme Ltd will get it in a minute.' });

In every theme

Clean SaaS

Glassmorphism 2.0

Liquid glass

Neumorphism / Soft UI

Claymorphism

Neubrutalism

Aurora / mesh gradient

Keyboard and screen readers

  • Focus is never moved to a toast. The Dismiss button is reachable at the end of the page.
  • Toasts close after 4 s; use duration: 0 for anything people must act on (WCAG 2.2.1).
  • Call initOgUI() at start-up so the live region exists before the first toast.

Install

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