# Callout

Sets a short passage of body text apart in a subtle box.

[View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Callout.tsx)

Figma: [Callout](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=3506-2664)

## Overview

A callout renders body text in a subtle box, padded 24px above and below and 32px at the sides. It sets a summary or an aside apart from the text around it, and adds no role or announcement.

## Examples

### Basic

```tsx
import { Callout } from '@tempoxyz/ds'

export function Demo() {
  return (
    <Callout>
      Stablecoin payments move fiat-referenced digital assets over blockchain networks. The onchain
      transfer is only one part of the end-to-end payment.
    </Callout>
  )
}
```

[View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Callout/Basic.tsx)

## Anatomy

Import the component and assemble its parts.

```tsx
import { Callout } from '@tempoxyz/ds'

<Callout />
```

## Guidelines

### When to Use

* Set a summary, a definition, or an aside apart from the body of an article or a docs page.

### When Not to Use

* Use an [Alert](/docs/components/alert) for a message about a status or an outcome.
* Use a [Banner](/docs/components/banner) for a message about the whole page or product.
* Use a [Snippet](/docs/components/snippet) for code that people copy.

### Keep the Passage Optional

**Do:** Use it for context that a reader can skip without missing a step.

```tsx
<Callout style={{ width: 360 }}>
  Tempo settles a payment in under a second, with fees paid in stablecoins.
</Callout>
```

**Don't:** Use it for an error or a warning. Use an Alert instead.

```tsx
<Callout style={{ width: 360 }}>Your payment failed. Check the address and try again.</Callout>
```

### Keep One Callout per Section

* **One Passage (1):** Sets one passage apart, so the reader notices it among the body text.
* **Short Text (3 lines):** Holds a few lines at most. Move a longer passage into the body text.

## Content

* Write complete sentences in the same voice as the text around the callout.
* Keep it to one idea in two or three lines.

## Accessibility

A callout renders a `<div>` with no role, so screen readers read its text in place.

* **Root (div):** Reads its text in place, as part of the surrounding content, with no role.
* **Landmark (role):** If the callout is an aside, set `role="note"` and an `aria-label` that names it.
* **Contrast (4.5:1):** Renders primary text on the subtle fill, above 4.5:1 in both color schemes.

## Related

[Alert](/docs/components/alert)

Use for a message about a status or an outcome.

[Banner](/docs/components/banner)

Use for a message about the whole page.
