MindeesUI
ComponentsOverlays

Notification

A top-anchored toast card with a title, optional body, tone accent, optional icon, and a row of inline action buttons.

Notification is a floating card anchored to the top of the screen, suited to system alerts and incoming messages. It renders a title, optional body, a tone-colored left accent, an optional leading icon, and a row of inline actions. It auto-dismisses after duration and fades in respecting reduce motion.

Import

import { Notification } from '@mindees/ui';

Usage

const [visible, setVisible] = useState(true);

return (
  <Notification
    visible={visible}
    tone="success"
    title="Backup complete"
    body="Your files are safely stored."
    actions={[{ label: 'View', onPress: openBackups }]}
    onDismiss={() => setVisible(false)}
  />
);

Props

PropTypeDefaultDescription
visiblebooleanControls whether the notification is shown.
titlestringBold leading line of the card.
bodystringOptional secondary-toned supporting text.
tone'info' | 'success' | 'warning' | 'danger''info'Sets the left accent color.
iconReact.ReactNodeOptional leading icon node.
actionsreadonly NotificationAction[]Inline action buttons ({ label, onPress }) under the body.
onDismiss() => voidCalled when the auto-dismiss timer elapses.
durationnumber6000Auto-dismiss after N ms. Set to 0 to disable.
styleStyleProp<ViewStyle>Style applied to the card surface.

Accessibility

The card uses accessibilityRole="alert"; danger notifications announce assertively, all others politely. The combined title and body are announced through the library announcer on appearance. Each action is a Pressable with accessibilityRole="button" labeled by its text. Animation is skipped under reduce motion.

On this page