# Callout

A bordered box for notes and status messages, set apart from the surrounding text.

Source: https://www.zazz.sh/api/primitives/callout/

## Installation

```bash
pnpm dlx zazz-ui add callout
```

Run `zazz-ui init` first if the project has no `zazz/` folder yet.

## Examples

### Default

```html
<div
  style="
    --display: grid;
    --gap: 4;
  "
>
  <aside data-ui="callout" aria-labelledby="callout-note">
    <p
      id="callout-note"
      data-ui="text-sm"
      style="
        --display: flex;
        --items: center;
        --gap: 2;
        --font-weight: strong;
      "
    >
      <svg
        style="
          --shrink: 0;
          --size: 4;
        "
        xmlns="http://www.w3.org/2000/svg"
        viewBox="0 0 20 20"
        fill="currentColor"
        aria-hidden="true"
      >
        <path
          fill-rule="evenodd"
          d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z"
          clip-rule="evenodd"
        />
      </svg>
      Note
    </p>
    <p data-ui="text-sm">Callouts set supporting information apart from the text around it.</p>
  </aside>
  <div data-ui="callout" data-callout-variant="muted">
    <p
      data-ui="text-sm"
      style="
        --display: flex;
        --items: center;
        --gap: 2;
        --font-weight: strong;
      "
    >
      <svg
        style="
          --shrink: 0;
          --size: 4;
        "
        xmlns="http://www.w3.org/2000/svg"
        viewBox="0 0 20 20"
        fill="currentColor"
        aria-hidden="true"
      >
        <path
          fill-rule="evenodd"
          d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z"
          clip-rule="evenodd"
        />
      </svg>
      Aside
    </p>
    <p data-ui="text-sm">A quieter surface for tips and context that readers can skip.</p>
  </div>
  <div data-ui="callout" data-callout-variant="info">
    <p
      data-ui="text-sm"
      style="
        --display: flex;
        --items: center;
        --gap: 2;
        --font-weight: strong;
      "
    >
      <svg
        style="
          --shrink: 0;
          --size: 4;
        "
        xmlns="http://www.w3.org/2000/svg"
        viewBox="0 0 20 20"
        fill="currentColor"
        aria-hidden="true"
      >
        <path
          fill-rule="evenodd"
          d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z"
          clip-rule="evenodd"
        />
      </svg>
      Scheduled maintenance
    </p>
    <p data-ui="text-sm">The dashboard is read-only on Saturday from 2 to 4 a.m. UTC.</p>
  </div>
  <div data-ui="callout" data-callout-variant="success">
    <p
      data-ui="text-sm"
      style="
        --display: flex;
        --items: center;
        --gap: 2;
        --font-weight: strong;
      "
    >
      <svg
        style="
          --shrink: 0;
          --size: 4;
        "
        xmlns="http://www.w3.org/2000/svg"
        viewBox="0 0 20 20"
        fill="currentColor"
        aria-hidden="true"
      >
        <path
          fill-rule="evenodd"
          d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"
          clip-rule="evenodd"
        />
      </svg>
      Payment received
    </p>
    <p data-ui="text-sm">Your invoice is paid, and a receipt is on its way to your inbox.</p>
  </div>
  <div data-ui="callout" data-callout-variant="warning">
    <p
      data-ui="text-sm"
      style="
        --display: flex;
        --items: center;
        --gap: 2;
        --font-weight: strong;
      "
    >
      <svg
        style="
          --shrink: 0;
          --size: 4;
        "
        xmlns="http://www.w3.org/2000/svg"
        viewBox="0 0 24 24"
        fill="currentColor"
        aria-hidden="true"
      >
        <path
          fill-rule="evenodd"
          d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z"
          clip-rule="evenodd"
        />
      </svg>
      Your trial ends in 3 days
    </p>
    <p data-ui="text-sm">Add a payment method to keep your projects running.</p>
  </div>
  <div data-ui="callout" data-callout-variant="destructive">
    <p
      data-ui="text-sm"
      style="
        --display: flex;
        --items: center;
        --gap: 2;
        --font-weight: strong;
      "
    >
      <svg
        style="
          --shrink: 0;
          --size: 4;
        "
        xmlns="http://www.w3.org/2000/svg"
        viewBox="0 0 20 20"
        fill="currentColor"
        aria-hidden="true"
      >
        <path
          fill-rule="evenodd"
          d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z"
          clip-rule="evenodd"
        />
      </svg>
      Deleting a workspace can't be undone
    </p>
    <p data-ui="text-sm">Its projects, files, and members are removed for good.</p>
  </div>
</div>
```

## Attributes

| Attribute | Kind | Values |
| --- | --- | --- |
| `data-ui="callout"` | identity | free value |
| `data-callout-variant` | preset | `destructive` `info` `muted` `success` `warning` |

## Hooks

| Hook | Default | State |
| --- | --- | --- |
| `--ui-callout-bg` | `var(--color-card)` | — |
| `--ui-callout-border-color` | `var(--color-border)` | — |
| `--ui-callout-border-style` | `solid` | — |
| `--ui-callout-border-width` | `1px` | — |
| `--ui-callout-corner-shape` | `var(--radius-corner-shape)` | — |
| `--ui-callout-gap` | `var(--space-xs)` | — |
| `--ui-callout-p` | `var(--space-sm)` | — |
| `--ui-callout-radius` | `var(--radius-md)` | — |
| `--ui-callout-shadow` | `none` | — |
| `--ui-callout-text` | `var(--color-card-foreground)` | — |
