Back to Supabase

Alert Collapsible

apps/design-system/content/docs/components/collapsible.mdx

1.26.04606 B
Original Source
<ComponentPreview name="alert-collapsible-demo" peekCode wide />

Usage

tsx
import { AlertCollapsible } from 'ui'
tsx
<AlertCollapsible trigger="Need help?">
  <p>Content revealed when expanded.</p>
</AlertCollapsible>

Default open

tsx
<AlertCollapsible trigger="Details" defaultOpen>
  <p>This section is expanded by default.</p>
</AlertCollapsible>

Variants

Supports the same variant prop as Alert: default, destructive, and warning.

tsx
<AlertCollapsible trigger="Warning" variant="warning">
  <p>Something needs attention.</p>
</AlertCollapsible>