Skip to main content
Feedback components provide ways to communicate important information, confirm actions, and guide users through interactions in the WordPress block editor.

Notifications

Notice

Communicates feedback to users about actions, states, or errors.
Props:
  • status?: 'info' | 'success' | 'warning' | 'error' - Notice type (default: ‘info’)
  • isDismissible?: boolean - Show close button (default: true)
  • onRemove?: () => void - Called when dismissed
  • onDismiss?: () => void - Additional dismiss callback
  • actions?: Array<NoticeAction> - Action buttons
  • politeness?: 'polite' | 'assertive' - Screen reader announcement priority
  • spokenMessage?: string | ReactNode - Custom screen reader message
Notice Actions:
Storybook: Notice

Snackbar / SnackbarList

Temporary, unobtrusive notifications that auto-dismiss.
Props:
  • notices: Array<Notice> - Array of notice objects
  • onRemove: (id) => void - Remove notice handler
  • className?: string - Additional CSS class
Notice Object:
  • id: string - Unique identifier
  • content: string | ReactNode - Notice content
  • status?: 'info' | 'success' | 'warning' | 'error'
  • actions?: Array<NoticeAction> - Action buttons
Storybook: Snackbar

Modals & Dialogs

Overlay dialog for focused interactions.
Props:
  • title: string - Modal title
  • onRequestClose: () => void - Close handler
  • isDismissible?: boolean - Show close button (default: true)
  • shouldCloseOnClickOutside?: boolean - Close on backdrop click (default: true)
  • shouldCloseOnEsc?: boolean - Close on Escape key (default: true)
  • size?: 'small' | 'medium' | 'large' - Modal size
  • icon?: IconType - Title icon
  • headerActions?: ReactNode - Custom header actions
Modal Features:
  • Traps focus within the modal
  • Prevents body scrolling
  • Accessible with ARIA labels
  • Supports keyboard navigation
  • Animated entrance/exit
Storybook: Modal

ConfirmDialog

Simple confirmation dialog built on Modal.
Props:
  • isOpen: boolean - Dialog visibility
  • onConfirm: () => void - Confirm action handler
  • onCancel: () => void - Cancel action handler
  • confirmButtonText?: string - Confirm button label (default: ‘OK’)
  • cancelButtonText?: string - Cancel button label (default: ‘Cancel’)
  • isDestructive?: boolean - Style confirm button as destructive
  • children: ReactNode - Dialog message
Storybook: ConfirmDialog
ConfirmDialog uses the experimental @ariakit/react Dialog component. The API may change in future releases.

Popovers & Tooltips

Popover

Floating content container positioned relative to a target.
Props:
  • position?: string - Placement (e.g., ‘top’, ‘bottom center’, ‘left’)
  • onClose?: () => void - Close handler
  • onFocusOutside?: (event) => void - Focus outside handler
  • noArrow?: boolean - Hide arrow pointer (default: true)
  • anchor?: Element - Anchor element for positioning
  • placement?: Placement - Modern placement API
  • focusOnMount?: boolean | 'firstElement' - Focus behavior
  • expandOnMobile?: boolean - Full-width on mobile
  • headerTitle?: string - Mobile header title
  • animate?: boolean - Enable animations (default: true)
Positioning:
Storybook: Popover

Tooltip

Small text hint shown on hover.
Props:
  • text: string - Tooltip content (required)
  • shortcut?: string - Keyboard shortcut to display
  • placement?: Placement - Tooltip position
  • delay?: number - Show delay in milliseconds
  • children: ReactElement - Single child element
Note: Button components have built-in tooltip support:
Storybook: Tooltip Menu with multiple actions triggered from a button.
Props:
  • icon?: IconType - Toggle button icon
  • label?: string - Accessibility label
  • controls: Array<Control | Array<Control>> - Menu items (arrays create groups)
  • className?: string - Additional CSS class
Control Object:
  • title: string - Menu item label
  • icon?: IconType - Item icon
  • onClick: () => void - Click handler
  • isActive?: boolean - Active state
  • isDisabled?: boolean - Disabled state
  • isDestructive?: boolean - Destructive styling
Grouped Controls:
Storybook: DropdownMenu Lower-level dropdown component for custom popover content.
Props:
  • renderToggle: (props) => ReactElement - Toggle button renderer
  • renderContent: (props) => ReactElement - Dropdown content renderer
  • position?: string - Popover position
  • className?: string - Additional CSS class
  • contentClassName?: string - Content container class
  • popoverProps?: object - Additional Popover props
Storybook: Dropdown

Disclosure Components

Disclosure

Accessible show/hide toggle using the disclosure pattern.

Slot Fill System

For advanced plugin integration, use the SlotFill pattern to inject content into predefined areas:

Accessibility

All feedback components follow accessibility best practices:
  • Notice: Announces status changes to screen readers with configurable politeness
  • Modal: Traps focus, prevents body scroll, supports keyboard navigation
  • Tooltip: Uses aria-label and respects user preferences for reduced motion
  • Popover: Manages focus properly and supports Escape key dismissal
  • DropdownMenu: Full keyboard navigation with arrow keys and Enter

Best Practices

When to Use Each Component

  • Notice: Important, persistent messages that require user attention
  • Snackbar: Brief, temporary confirmations of actions
  • Modal: Complex interactions requiring focus and confirmation
  • ConfirmDialog: Simple yes/no confirmations for destructive actions
  • Tooltip: Supplementary information on hover (not critical info)
  • Popover: Contextual content and temporary controls
  • DropdownMenu: Multiple related actions

Usage Guidelines

  1. Use appropriate status values for semantic meaning
  2. Provide clear, actionable button labels
  3. Don’t nest modals within modals
  4. Keep snackbar messages concise (2-3 words)
  5. Use destructive styling for irreversible actions
  6. Ensure tooltips don’t hide critical information

Resources