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.
<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>Menu
<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
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
npx @og-ui/cli add popover
npx @og-ui/cli add popover --react # with the React component