MiHCM
feedback/@mihcm/ui·v0.21.0·stable

Alert

Inline message banner with Alert, AlertTitle, AlertDescription pieces. role="alert" for screen-reader announcements.

Default informational alert

import { Alert, AlertTitle, AlertDescription } from '@mihcm/ui/Alert';
 
<Alert>
  <AlertTitle>Note</AlertTitle>
  <AlertDescription>Your session will expire in 5 minutes.</AlertDescription>
</Alert>

Destructive with icon

import { Alert, AlertTitle, AlertDescription } from '@mihcm/ui/Alert';
import { AlertCircle } from '@mihcm/icons';
 
<Alert variant="destructive">
  <AlertCircle className="size-4" />
  <AlertTitle>Something went wrong</AlertTitle>
  <AlertDescription>
    We couldn't save your changes. Check your connection and try again.
  </AlertDescription>
</Alert>

Success confirmation

import { Alert, AlertTitle, AlertDescription } from '@mihcm/ui/Alert';
import { CheckCircle } from '@mihcm/icons';
 
<Alert variant="success">
  <CheckCircle className="size-4" />
  <AlertTitle>Profile updated</AlertTitle>
  <AlertDescription>Your changes have been saved successfully.</AlertDescription>
</Alert>

Warning

import { Alert, AlertDescription } from '@mihcm/ui/Alert';
import { TriangleAlert } from '@mihcm/icons';
 
<Alert variant="warning">
  <TriangleAlert className="size-4" />
  <AlertDescription>
    This will reset all custom settings to their defaults.
  </AlertDescription>
</Alert>