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.

Overlays

Popover and menu

Native popover API (light dismiss, Esc, top layer), placed next to its trigger. A menu is a popover with role="menu".

Popover

Share this project

Anyone with the link can view it.

html
<button class="og-button" popovertarget="popover">Share</button>
<div popover id="popover" class="og-popover">
  <strong>Share this project</strong>
  <p>Anyone with the link can view it.</p>
</div>
html
<button class="og-button" popovertarget="popover" aria-haspopup="menu">Actions ▾</button>
<div popover id="popover" class="og-popover og-menu" role="menu" aria-label="Project actions">
  <button class="og-menu__item" role="menuitem">Rename</button>
  <button class="og-menu__item" role="menuitem">Duplicate</button>
  <hr class="og-menu__separator" />
  <button class="og-menu__item og-menu__item--danger" role="menuitem">Delete</button>
</div>

React

tsx
import { Popover, Menu, MenuItem, MenuSeparator, Button } from '@og-ui/react';

<Popover trigger={<Button>Share</Button>}>Anyone with the link can view it.</Popover>

<Menu trigger={<Button>Actions ▾</Button>} label="Project actions">
  <MenuItem onClick={rename}>Rename</MenuItem>
  <MenuSeparator />
  <MenuItem danger onClick={remove}>Delete</MenuItem>
</Menu>

In every theme

Clean SaaS

Share this project

Anyone with the link can view it.

Glassmorphism 2.0

Share this project

Anyone with the link can view it.

Liquid glass

Share this project

Anyone with the link can view it.

Neumorphism / Soft UI

Share this project

Anyone with the link can view it.

Claymorphism

Share this project

Anyone with the link can view it.

Neubrutalism

Share this project

Anyone with the link can view it.

Aurora / mesh gradient

Share this project

Anyone with the link can view it.

Keyboard and screen readers

  • Enter or Space on the trigger opens it; a menu focuses its first item.
  • Menu: Down/Up move (and wrap), Home/End jump to the first/last item.
  • Esc closes and returns focus to the trigger; choosing an item does too.
  • Tab closes a menu and moves on.

Install

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