Callout
The
Callout
component displays information in a colorful box. Callouts are used to draw user
attention to important information.Basic usage
Basic usage
tsxCopied1<Callout title="This is a callout">2Callouts are used to draw attention to important information.3</Callout>
Variants
Variants
Callouts come in variants that determine the Callout's appearances.
tsxCopied1<Callout title="Info" variant="info">2Info draws attention to important information.3</Callout>4<Callout title="Success" variant="success">5Success draws attention to successful actions.6</Callout>7<Callout title="Warning" variant="warning">8Warning draws attention to disclaimers or potential issues.9</Callout>10<Callout title="Error" variant="error">11Error draws attention to errors or issues.12</Callout>13<Callout title="Neutral" variant="neutral">14Neutral draws attention to information but in a less flashy manner.15</Callout>
Icons
Icons
Callouts display an icon to the left of the title. All variants except for
neutral
set an icon by
default. You can override the icon by passing an icon
prop. You can also pass null
to hide the
icon.tsxCopied1<Callout title="Airplane icon" icon={<PaperAirplaneIcon />}>2This callout has an Airplane icon.3</Callout>4<Callout title="No icon" icon={null}>5This callout has no icon.6</Callout>
Component API
Component API
children
optional
Callout description.
grow
optional
If true, the element will grow to fill available space.
This prop works only if the element is a direct child of a Stack.
height
optional
Default
auto
icon
optional
Specify a custom icon or null to hide the icon.
title
optional
Callout title.
variant
optional
Default
info
Callout appearance.
width
optional
Default
auto