# Callout

> Cherry Callout component - tinted admonition boxes with five semantic intents and automatic icons.

Source: https://docs.cherry.al/v1/code/callout

> For the complete documentation index, see [llms.txt](https://docs.cherry.al/llms.txt).

# Callout

<Preview bleed>
<iframe className="light-only" src="https://v1.cherry.al/preview/callout?theme=light" title="Callout" loading="lazy" style={{ width: "100%", height: "480px" }} />
<iframe className="dark-only" src="https://v1.cherry.al/preview/callout?theme=dark" title="Callout" loading="lazy" style={{ width: "100%", height: "480px" }} />

```jsx
import React from "react";
import { Callout } from "cherry-styled-components";

export default function Page() {
  return (
    <Callout $type="warning">
      <p>Changing this setting logs out every active session.</p>
    </Callout>
  );
}
```
</Preview>

The Callout component highlights a passage of content in a tinted, bordered box with a leading icon. Five semantic intents cover the usual admonitions: `note`, `info`, `warning`, `danger`, and `success`. Without a `$type` it renders as a neutral card on the theme's surface colors, with no tint and no icon.

Each intent brings its own icon: `CircleAlert` for note, `Info` for info, `TriangleAlert` for warning, `OctagonAlert` for danger, and `Check` for success. Override it with `$icon`, for example `<Callout $type="note" $icon={Lightbulb}>` with `Lightbulb` imported from `lucide-react`.

## Properties

<Field value="$type" type='"note" | "info" | "warning" | "danger" | "success"'>
  The semantic intent, controlling tint and default icon. Omit it for a neutral, untinted card.
</Field>

<Field value="$icon" type="IconSource">
  Overrides the intent's default icon, or supplies one for an untyped callout: a Lucide component imported from `lucide-react`, or a rendered element.
</Field>

<Field value="$hideIcon" type="boolean">
  Renders the callout without an icon.
</Field>

The component also accepts all native `<div>` attributes and forwards its ref to the root element. The library exports the `CalloutType` type.

<Callout type="info">
  The tints are alert-semantic and deliberately independent of the brand palette: a white-labeled theme can recolor everything else without a danger callout turning reassuring. Each intent carries a light and a dark tint, and the dark one applies under the `dark` class on `<html>` that sets the mode (see [Dark Mode](/v1/code/dark-mode)), so it is right from the first paint. A `data-theme="dark"` or `data-theme="light"` ancestor wins over the class, so a section forced into one mode keeps that mode's tint.
</Callout>

<Button href="https://github.com/cherry-design-system/styled-components/blob/main/src/lib/callout.tsx" icon="code" iconPosition="left">
  View Source
</Button>
