Skip to content
Frauthy Brand
Frauthy index

Go anywhere.

    No exact contract found. Try a component family, product name, prop, or keyboard key.

    ↑↓ move↵ openesc close

    Toast

    overlay

    Contextual notifications that stack bottom-right and auto-dismiss. Four variants — info, success, warning, error — with an imperativeuseToast API driven by a provider context.

    Preview

    Usage

    import { ToastProvider, useToast } from 'PRIVATE_BETA_PACKAGE_COORDINATE_REDACTED';
    
    // Wrap your app (or a subtree) with the provider
    <ToastProvider>
      <App />
    </ToastProvider>
    
    // Inside any descendant component
    const { createToast } = useToast();
    
    createToast({
      message: 'Settings saved.',
      variant: 'success',
      duration: 5000,
    });

    Props

    NameTypeDefaultDescription
    ToastProvider
    childrenJSX.Element--Application subtree that can access the toast API
    ToastOptions (passed to createToast)
    messagestring | JSX.Element--Toast content
    variant'info' | 'success' | 'warning' | 'error''info'Visual variant
    durationnumber5000Auto-dismiss in ms. Set to 0 to disable
    useToast() return value
    createToast(options: ToastOptions) => string--Show a toast; returns its id
    dismissToast(id: string) => void--Programmatically dismiss a toast

    Accessibility

    Do / Don't

    Do

    Use toasts for transient feedback after user actions (save, delete, send). Keep messages brief and actionable.

    Don't

    Don't use toasts for critical errors that require user action to resolve. Use a Modal or inline alert instead.