# Callout
URL: /lynx/components/callout
Source: https://github.com/daangn/seed-design/blob/dev/docs/content/lynx/components/callout.mdx
A message component that visually emphasizes and conveys important information or tips to users.
Lynx Engine 최소 버전: 3.6
사용 가능 버전: @seed-design/lynx-react@0.5.0, @seed-design/lynx-css@0.9.0
## Preview
```tsx
import "./styles";
import { useSeedClassName } from "@seed-design/lynx-react";
import { ActionableCallout, Callout, DismissibleCallout } from "@/components/ui/callout";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
);
}
```
## Installation
- npm: npx @seed-design/cli@latest add ui:callout
- pnpm: pnpm dlx @seed-design/cli@latest add ui:callout
- yarn: yarn dlx @seed-design/cli@latest add ui:callout
- bun: bun x @seed-design/cli@latest add ui:callout
## Properties
### `Callout`
### `ActionableCallout`
### `DismissibleCallout`
## Usage
The installed snippet exports the basic `Callout`, `ActionableCallout` which makes the entire area tappable, and `DismissibleCallout` which can be dismissed.
```tsx
import { Callout } from "@/components/ui/callout";
export function App() {
return ;
}
```
If you need low-level composition, you can use the compound API of `@seed-design/lynx-react` directly.
```tsx
import { Callout } from "@seed-design/lynx-react";
export function App() {
return (
Notification
Check out the latest news.
);
}
```
## Examples
### Content Composition
#### Text Only
```tsx
import "./styles";
import { useSeedClassName } from "@seed-design/lynx-react";
import { ActionableCallout, Callout, DismissibleCallout } from "@/components/ui/callout";
const description =
"기능에 대한 안내 또는 유익한 내용을 전달해요. 콜아웃은 꼭 필요한 경우에만 절제하여 사용해요.";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
);
}
```
#### With Icon
```tsx
import "./styles";
import IconCalendarFill from "@karrotmarket/lynx-monochrome-icon/IconCalendarFill";
import { useSeedClassName } from "@seed-design/lynx-react";
import { ActionableCallout, Callout, DismissibleCallout } from "@/components/ui/callout";
const description =
"기능에 대한 안내 또는 유익한 내용을 전달해요. 콜아웃은 꼭 필요한 경우에만 절제하여 사용해요.";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
} description={description} />
} description={description} />
} description={description} />
);
}
```
#### With Title Text
```tsx
import "./styles";
import { useSeedClassName } from "@seed-design/lynx-react";
import { ActionableCallout, Callout, DismissibleCallout } from "@/components/ui/callout";
const description =
"기능에 대한 안내 또는 유익한 내용을 전달해요. 콜아웃은 꼭 필요한 경우에만 절제하여 사용해요.";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
);
}
```
#### With Link Label
`ActionableCallout` does not provide `linkProps`.
```tsx
import "./styles";
import { useSeedClassName } from "@seed-design/lynx-react";
import { Callout, DismissibleCallout } from "@/components/ui/callout";
const description =
"기능에 대한 안내 또는 유익한 내용을 전달해요. 콜아웃은 꼭 필요한 경우에만 절제하여 사용해요.";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
);
}
```
#### With All Elements
```tsx
import "./styles";
import IconCalendarFill from "@karrotmarket/lynx-monochrome-icon/IconCalendarFill";
import { useSeedClassName } from "@seed-design/lynx-react";
import { Callout, DismissibleCallout } from "@/components/ui/callout";
const description =
"기능에 대한 안내 또는 유익한 내용을 전달해요. 콜아웃은 꼭 필요한 경우에만 절제하여 사용해요.";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
}
description={description}
linkProps={{ children: "시도해 보기" }}
/>
}
description={description}
linkProps={{ children: "시도해 보기" }}
/>
);
}
```
### Tone
`tone` supports `neutral`, `informative`, `positive`, `warning`, `critical`, and `magic`. The default is `neutral`.
#### Neutral (Default)
```tsx
import "./styles";
import IconCalendarFill from "@karrotmarket/lynx-monochrome-icon/IconCalendarFill";
import { useSeedClassName } from "@seed-design/lynx-react";
import { ActionableCallout, Callout, DismissibleCallout } from "@/components/ui/callout";
const description =
"기능에 대한 안내 또는 유익한 내용을 전달해요. 콜아웃은 꼭 필요한 경우에만 절제하여 사용해요.";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
} description={description} />
}
description={description}
/>
}
description={description}
/>
);
}
```
#### Informative
```tsx
import "./styles";
import IconCalendarFill from "@karrotmarket/lynx-monochrome-icon/IconCalendarFill";
import { useSeedClassName } from "@seed-design/lynx-react";
import { ActionableCallout, Callout, DismissibleCallout } from "@/components/ui/callout";
const description =
"기능에 대한 안내 또는 유익한 내용을 전달해요. 콜아웃은 꼭 필요한 경우에만 절제하여 사용해요.";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
} description={description} />
}
description={description}
/>
}
description={description}
/>
);
}
```
#### Positive
```tsx
import "./styles";
import IconCalendarFill from "@karrotmarket/lynx-monochrome-icon/IconCalendarFill";
import { useSeedClassName } from "@seed-design/lynx-react";
import { ActionableCallout, Callout, DismissibleCallout } from "@/components/ui/callout";
const description =
"기능에 대한 안내 또는 유익한 내용을 전달해요. 콜아웃은 꼭 필요한 경우에만 절제하여 사용해요.";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
} description={description} />
}
description={description}
/>
}
description={description}
/>
);
}
```
#### Warning
```tsx
import "./styles";
import IconCalendarFill from "@karrotmarket/lynx-monochrome-icon/IconCalendarFill";
import { useSeedClassName } from "@seed-design/lynx-react";
import { ActionableCallout, Callout, DismissibleCallout } from "@/components/ui/callout";
const description =
"기능에 대한 안내 또는 유익한 내용을 전달해요. 콜아웃은 꼭 필요한 경우에만 절제하여 사용해요.";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
} description={description} />
}
description={description}
/>
}
description={description}
/>
);
}
```
#### Critical
```tsx
import "./styles";
import IconCalendarFill from "@karrotmarket/lynx-monochrome-icon/IconCalendarFill";
import { useSeedClassName } from "@seed-design/lynx-react";
import { ActionableCallout, Callout, DismissibleCallout } from "@/components/ui/callout";
const description =
"기능에 대한 안내 또는 유익한 내용을 전달해요. 콜아웃은 꼭 필요한 경우에만 절제하여 사용해요.";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
} description={description} />
}
description={description}
/>
}
description={description}
/>
);
}
```
#### Magic
```tsx
import "./styles";
import IconSparkle2 from "@karrotmarket/lynx-multicolor-icon/IconSparkle2";
import { useSeedClassName } from "@seed-design/lynx-react";
import { ActionableCallout, Callout, DismissibleCallout } from "@/components/ui/callout";
const description =
"기능에 대한 안내 또는 유익한 내용을 전달해요. 콜아웃은 꼭 필요한 경우에만 절제하여 사용해요.";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
} description={description} />
} description={description} />
} description={description} />
);
}
```
## Differences from Web Version
| Area | React | Lynx |
| -------------- | ---------------------------- | ---------------------------------------------------------- |
| Element | `div`, `span`, `button` | `view`, `text` |
| Event | `onClick` | `bindtap`, `main-thread:bindtap` |
| Accessibility | HTML semantic elements, ARIA | `accessibility-*` |
| Polymorphism | `asChild` supported | Not supported |
| Link underline | `text-decoration` | Border-based representation due to Lynx preset constraints |
In Lynx, the `pressed` Recipe variant is applied while pressing a tappable `Root`. `Callout.Link` uses `accessibility-traits="link"` by default. The `button` role is applied to tappable `Root` and `CloseButton`.
## Lynx Unsupported Features
- `asChild`: Lynx does not have DOM Slot-based polymorphic rendering.
- Rendering link labels as child elements: Instead of `asChild`, pass the link text to `linkProps.children` and handle tap actions with `linkProps.bindtap`.