Feedback

Alert

Static contextual feedback messages with icons and actions.

Basic Usage

Contextual feedback messages for highlighting information, success, warnings, or errors.

'use client'

import React from 'react'
import { Alert, Stack } from 'biibaos'

export default function App() {
  return (
    <Stack direction="column" gap={12}>
      <Alert title="Default Alert" description="Simple info alert" />
      <Alert variant="success" title="Success" description="Changes saved" />
      <Alert variant="danger" title="Error" description="Processing failed" />
    </Stack>
  )
}

With Action

Alerts can include a primary action button on the far right.

'use client'

import React from 'react'
import { Alert } from 'biibaos'

export default function App() {
  return (
    <Alert 
      variant="info"
      title="Update Available" 
      description="Version 2.0.4 is now available for download."
      action={{ label: 'Update now', onClick: () => alert('Updating...') }}
    />
  )
}

Dismissible

Add an onClose callback to show a close button.

'use client'

import React from 'react'
import { Alert } from 'biibaos'

export default function App() {
  return (
    <Alert 
      variant="warning"
      title="Attention Required" 
      onClose={() => alert('Closed')}
    />
  )
}

Properties

PropTypeDefaultDescription
titlestringStructural modal header title
descriptionReact.ReactNodeSupporting description or helper guidance text
variantAlertVariant'default'Semantic design theme variant
onClose() => voidCallback function triggered when closing the overlay
closeIconReact.ReactNodeConfigures the closeIcon option
styleReact.CSSPropertiesInline CSS styles for custom overrides
classNamestringAdditional CSS class names to apply to the root element
iconReact.ReactNodeCustom icon prefix element
action{ label: stringConfigures the action option
onClick() => voidClick event callback handler