# Callout

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

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

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

# Callout

<iframe className="light-only" src="https://demo.cherry.al/preview/callout?theme=light" title="Callout" loading="lazy" style={{ width: "100%", height: "480px", border: "1px solid var(--color-grayLight)", borderRadius: "12px" }} />
<iframe className="dark-only" src="https://demo.cherry.al/preview/callout?theme=dark" title="Callout" loading="lazy" style={{ width: "100%", height: "480px", border: "1px solid var(--color-grayLight)", borderRadius: "12px" }} />

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.

```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>
  );
}
```

Each intent brings its own icon: `CircleAlert` for note, `Info` for info, `TriangleAlert` for warning, `OctagonAlert` for danger, and `Check` for success.

## 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="IconProps">
  Lucide icon name that overrides the intent's default icon, or supplies one for an untyped callout.
</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 both when the theme object is dark and under a `dark` class on `<html>`, so it is correct even before hydration swaps the theme.
</Callout>

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