A message component that visually emphasizes and conveys important information or tips to users.
@seed-design/lynx-react@0.5.0, @seed-design/lynx-css@0.9.0
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 (
< view className = { `${ seedClassName } docs-lynx-callout-root` }>
< view className = "callout-preview" >
< Callout description = "Aute nulla proident tempor minim eiusmod. In nostrud officia irure laborum." />
< ActionableCallout description = "Aute nulla proident tempor minim eiusmod. In nostrud officia irure laborum." />
< DismissibleCallout description = "Aute nulla proident tempor minim eiusmod. In nostrud officia irure laborum." />
</ view >
</ view >
);
}
npx @seed-design/cli@latest add ui:callout pnpm dlx @seed-design/cli@latest add ui:callout yarn dlx @seed-design/cli@latest add ui:callout bun x @seed-design/cli@latest add ui:callout
Install dependencies
npm install @karrotmarket/lynx-monochrome-icon @seed-design/lynx-react yarn add @karrotmarket/lynx-monochrome-icon @seed-design/lynx-react pnpm add @karrotmarket/lynx-monochrome-icon @seed-design/lynx-react bun add @karrotmarket/lynx-monochrome-icon @seed-design/lynx-react Copy the code below and paste it in /**
* @file ui:callout
* @requires @seed-design/lynx-react@>=0.5.0 <1.0.0
* @requires @seed-design/lynx-css@>=0.9.0 <1.0.0
**/
import IconChevronRightLine from "@karrotmarket/lynx-monochrome-icon/IconChevronRightLine" ;
import IconXmarkLine from "@karrotmarket/lynx-monochrome-icon/IconXmarkLine" ;
import * as React from "@lynx-js/react" ;
import {
Callout as SeedCallout,
PrefixIcon,
SuffixIcon,
type PrefixIconProps,
} from "@seed-design/lynx-react" ;
export interface CalloutProps
extends Omit < SeedCallout . RootProps , "children" | "open" | "defaultOpen" | "onDismiss" > {
prefixIcon ?: PrefixIconProps [ "icon" ];
title ?: React . ReactNode ;
description : React . ReactNode ;
linkProps ?: SeedCallout . LinkProps ;
}
/**
* @see https://crispy.carrot-soft.tech/lynx/components/callout
*/
export const Callout = React. forwardRef < unknown , CalloutProps >(
({ prefixIcon , title , description , linkProps , ... otherProps }, ref ) => {
return (
< SeedCallout.Root ref = {ref} { ... otherProps}>
{prefixIcon ? < PrefixIcon icon = {prefixIcon} /> : null }
< SeedCallout.Content >
{title ? < SeedCallout.Title >{title}</ SeedCallout.Title > : null }
< SeedCallout.Description >{description}</ SeedCallout.Description >
{linkProps ? < SeedCallout.Link { ... linkProps} /> : null }
</ SeedCallout.Content >
</ SeedCallout.Root >
);
},
);
Callout.displayName = "Callout" ;
export interface ActionableCalloutProps
extends Omit < SeedCallout . RootProps , "children" | "open" | "defaultOpen" | "onDismiss" > {
prefixIcon ?: PrefixIconProps [ "icon" ];
title ?: React . ReactNode ;
description : React . ReactNode ;
}
/**
* @see https://crispy.carrot-soft.tech/lynx/components/callout
*/
export const ActionableCallout = React. forwardRef < unknown , ActionableCalloutProps >(
({ prefixIcon , title , description , ... otherProps }, ref ) => {
return (
< SeedCallout.Root ref = {ref} { ... otherProps}>
{prefixIcon ? < PrefixIcon icon = {prefixIcon} /> : null }
< SeedCallout.Content >
{title ? < SeedCallout.Title >{title}</ SeedCallout.Title > : null }
< SeedCallout.Description >{description}</ SeedCallout.Description >
</ SeedCallout.Content >
< SuffixIcon icon = {< IconChevronRightLine />} />
</ SeedCallout.Root >
);
},
);
ActionableCallout.displayName = "ActionableCallout" ;
export interface DismissibleCalloutProps extends Omit < SeedCallout . RootProps , "children" > {
prefixIcon ?: PrefixIconProps [ "icon" ];
title ?: React . ReactNode ;
description : React . ReactNode ;
linkProps ?: SeedCallout . LinkProps ;
dismissLabel ?: string ;
}
/**
* @see https://crispy.carrot-soft.tech/lynx/components/callout
*/
export const DismissibleCallout = React. forwardRef < unknown , DismissibleCalloutProps >(
({ prefixIcon , title , description , linkProps , dismissLabel = "닫기" , ... otherProps }, ref ) => {
return (
< SeedCallout.Root ref = {ref} { ... otherProps}>
{prefixIcon ? < PrefixIcon icon = {prefixIcon} /> : null }
< SeedCallout.Content >
{title ? < SeedCallout.Title >{title}</ SeedCallout.Title > : null }
< SeedCallout.Description >{description}</ SeedCallout.Description >
{linkProps ? < SeedCallout.Link { ... linkProps} /> : null }
</ SeedCallout.Content >
< SeedCallout.CloseButton accessibility-label = {dismissLabel}>
< SuffixIcon icon = {< IconXmarkLine />} />
</ SeedCallout.CloseButton >
</ SeedCallout.Root >
);
},
);
DismissibleCallout.displayName = "DismissibleCallout" ;
/**
* This file is a snippet from Crispy, helping you get started quickly with @seed-design/* packages.
* You can extend this snippet however you want.
*/
prefixIcon?React.ReactElement < LynxIconElementProps, string | React.JSXElementConstructor < any >> | undefined
title?React.ReactNode
descriptionReact.ReactNode
linkProps?SeedCallout.LinkProps | undefined
bindtap?EventHandler < BaseTouchEvent < Target >> | undefined
main-thread:bindtap?EventHandler < BaseTouchEvent < Element >> | undefined
style?CSSProperties | undefined
className?string | undefined
prefixIcon?React.ReactElement < LynxIconElementProps, string | React.JSXElementConstructor < any >> | undefined
title?React.ReactNode
descriptionReact.ReactNode
className?string | undefined
bindtap?EventHandler < BaseTouchEvent < Target >> | undefined
main-thread:bindtap?EventHandler < BaseTouchEvent < Element >> | undefined
style?CSSProperties | undefined
prefixIcon?React.ReactElement < LynxIconElementProps, string | React.JSXElementConstructor < any >> | undefined
title?React.ReactNode
descriptionReact.ReactNode
linkProps?SeedCallout.LinkProps | undefined
dismissLabel?string | undefined
className?string | undefined
bindtap?EventHandler < BaseTouchEvent < Target >> | undefined
main-thread:bindtap?EventHandler < BaseTouchEvent < Element >> | undefined
open?boolean | undefined
defaultOpen?boolean | undefined
onDismiss?(() => void ) | undefined
style?CSSProperties | undefined
The installed snippet exports the basic Callout, ActionableCallout which makes the entire area tappable, and DismissibleCallout which can be dismissed.
import { Callout } from "@/components/ui/callout" ;
export function App () {
return < Callout title = "Notification" description = "Check out the latest news." />;
}
If you need low-level composition, you can use the compound API of @seed-design/lynx-react directly.
import { Callout } from "@seed-design/lynx-react" ;
export function App () {
return (
< Callout.Root tone = "informative" >
< Callout.Content >
< Callout.Title >Notification</ Callout.Title >
< Callout.Description >Check out the latest news.</ Callout.Description >
</ Callout.Content >
</ Callout.Root >
);
}
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 (
< view className = { `${ seedClassName } docs-lynx-callout-root` }>
< view className = "callout-preview" >
< Callout description = {description} />
< ActionableCallout description = {description} />
< DismissibleCallout description = {description} />
</ view >
</ view >
);
}
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 (
< view className = { `${ seedClassName } docs-lynx-callout-root` }>
< view className = "callout-preview" >
< Callout prefixIcon = {< IconCalendarFill />} description = {description} />
< ActionableCallout prefixIcon = {< IconCalendarFill />} description = {description} />
< DismissibleCallout prefixIcon = {< IconCalendarFill />} description = {description} />
</ view >
</ view >
);
}
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 (
< view className = { `${ seedClassName } docs-lynx-callout-root` }>
< view className = "callout-preview" >
< Callout title = "타이틀" description = {description} />
< ActionableCallout title = "타이틀" description = {description} />
< DismissibleCallout title = "타이틀" description = {description} />
</ view >
</ view >
);
}
ActionableCallout does not provide linkProps.
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 (
< view className = { `${ seedClassName } docs-lynx-callout-root` }>
< view className = "callout-preview" >
< Callout description = {description} linkProps = {{ children: "시도해 보기" }} />
< DismissibleCallout description = {description} linkProps = {{ children: "시도해 보기" }} />
</ view >
</ view >
);
}
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 (
< view className = { `${ seedClassName } docs-lynx-callout-root` }>
< view className = "callout-preview" >
< Callout
title = "타이틀"
prefixIcon = {< IconCalendarFill />}
description = {description}
linkProps = {{ children: "시도해 보기" }}
/>
< DismissibleCallout
title = "타이틀"
prefixIcon = {< IconCalendarFill />}
description = {description}
linkProps = {{ children: "시도해 보기" }}
/>
</ view >
</ view >
);
}
tone supports neutral, informative, positive, warning, critical, and magic. The default is neutral.
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 (
< view className = { `${ seedClassName } docs-lynx-callout-root` }>
< view className = "callout-preview" >
< Callout tone = "neutral" prefixIcon = {< IconCalendarFill />} description = {description} />
< ActionableCallout
tone = "neutral"
prefixIcon = {< IconCalendarFill />}
description = {description}
/>
< DismissibleCallout
tone = "neutral"
prefixIcon = {< IconCalendarFill />}
description = {description}
/>
</ view >
</ view >
);
}
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 (
< view className = { `${ seedClassName } docs-lynx-callout-root` }>
< view className = "callout-preview" >
< Callout tone = "informative" prefixIcon = {< IconCalendarFill />} description = {description} />
< ActionableCallout
tone = "informative"
prefixIcon = {< IconCalendarFill />}
description = {description}
/>
< DismissibleCallout
tone = "informative"
prefixIcon = {< IconCalendarFill />}
description = {description}
/>
</ view >
</ view >
);
}
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 (
< view className = { `${ seedClassName } docs-lynx-callout-root` }>
< view className = "callout-preview" >
< Callout tone = "positive" prefixIcon = {< IconCalendarFill />} description = {description} />
< ActionableCallout
tone = "positive"
prefixIcon = {< IconCalendarFill />}
description = {description}
/>
< DismissibleCallout
tone = "positive"
prefixIcon = {< IconCalendarFill />}
description = {description}
/>
</ view >
</ view >
);
}
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 (
< view className = { `${ seedClassName } docs-lynx-callout-root` }>
< view className = "callout-preview" >
< Callout tone = "warning" prefixIcon = {< IconCalendarFill />} description = {description} />
< ActionableCallout
tone = "warning"
prefixIcon = {< IconCalendarFill />}
description = {description}
/>
< DismissibleCallout
tone = "warning"
prefixIcon = {< IconCalendarFill />}
description = {description}
/>
</ view >
</ view >
);
}
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 (
< view className = { `${ seedClassName } docs-lynx-callout-root` }>
< view className = "callout-preview" >
< Callout tone = "critical" prefixIcon = {< IconCalendarFill />} description = {description} />
< ActionableCallout
tone = "critical"
prefixIcon = {< IconCalendarFill />}
description = {description}
/>
< DismissibleCallout
tone = "critical"
prefixIcon = {< IconCalendarFill />}
description = {description}
/>
</ view >
</ view >
);
}
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 (
< view className = { `${ seedClassName } docs-lynx-callout-root` }>
< view className = "callout-preview" >
< Callout tone = "magic" prefixIcon = {< IconSparkle2 />} description = {description} />
< ActionableCallout tone = "magic" prefixIcon = {< IconSparkle2 />} description = {description} />
< DismissibleCallout tone = "magic" prefixIcon = {< IconSparkle2 />} description = {description} />
</ view >
</ view >
);
}
Area React Lynx Element div, span, buttonview, textEvent onClickbindtap, main-thread:bindtapAccessibility HTML semantic elements, ARIA accessibility-*Polymorphism asChild supportedNot supported Link underline text-decorationBorder-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.
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.