Feedback
Toast
Notifications in one polite live region; errors use role="alert". They pause while hovered or focused.
Trigger a toast
<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
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
npx @og-ui/cli add toast
npx @og-ui/cli add toast --react # with the React component