CalloutA visual message component to attract user's attention.
Install the component from your command line.
Import and usage.
The
The Callout component can be rendered with or without an outline border:
The Callout component supports high contrast mode for better visibility:
The Callout component can include an action button:
The Callout component can be made dismissible:
The Callout component supports custom width:
The Callout component includes appropriate ARIA attributes for accessibility:
npm install @raystack/apsara
import { Callout } from '@raystack/apsara/v1' <Callout type="success">A short message to attract user's attention</Callout>
Callout
component accepts the following props:
type
: Visual style variant ("grey"
|"success"
|"alert"
|"gradient"
|"accent"
|"attention"
|"normal"
, default: "grey")outline
: Whether to show an outline border (boolean
, default: false)highContrast
: Whether to use high contrast colors (boolean
, default: false)action
: Optional action element to display on the rightdismissible
: Whether to show a dismiss button (boolean
, default: false)onDismiss
: Callback function when dismiss button is clickedwidth
: Custom width for the calloutclassName
: Additional CSS class names- All other HTMLDivElement attributes from React
type
prop:
loading...
loading...
loading...
loading...
loading...
loading...
- Uses semantic HTML elements for proper structure
- Dismiss button includes
aria-label
for screen readers - Interactive elements are keyboard accessible