Corpora UI
Atoms

Alert

Inline feedback for success, warnings, errors, and information.

Usage

Import the stylesheet once at the application root: @exegia/corpora-ui/index.css.

import { Alert, AlertTitle, AlertDescription } from "@exegia/corpora-ui/ui/alert"

function ComponentPreview({ variant }: { variant: "default" | "info" | "success" | "warning" | "error" }) {

  return (
    <div className="relative mx-auto w-full max-w-lg p-6">
      <Alert variant={variant}><AlertTitle>Import complete</AlertTitle><AlertDescription>Your documents are ready to review.</AlertDescription></Alert>
    </div>
  )
}

<ComponentPreview variant={"success"} />

API notes

variant selects the semantic treatment: default, info, success, warning, or error. AlertTitle, AlertDescription, and AlertAction compose the content.

Last updated on

On this page