Feedback

Snackbar

Action-focused snackbar that springs up from the bottom.

Snackbars

Snackbars are small alerts at the bottom of the screen with optional actions.

'use client'

import React from 'react'
import { useSnackbar, Button } from 'biibaos'

export default function App() {
  const { snackbar } = useSnackbar()

  return (
    <Button 
      onClick={() => snackbar('Item deleted', { 
        action: { label: 'Undo', onClick: () => {} } 
      })}
    >
      Show Snackbar
    </Button>
  )
}

Properties

PropTypeDefaultDescription
messagestringThe primary message text of the notification
action{ label: string; onClick: () => void }Optional button label and action handler
durationnumber3500Time in milliseconds before auto-dismiss