Highlight important information or guide users toward key actions.
import { Callout } from '@fluxui-dev/react';import { ClockIcon } from '@fluxui-dev/react/icons';<Callout icon={ClockIcon}> <Callout.Heading>Upcoming maintenance</Callout.Heading> <Callout.Text> Our servers will be undergoing scheduled maintenance this Sunday from 2 AM - 5 AM UTC. Some services may be temporarily unavailable.{' '} <Callout.Link href="#">Learn more</Callout.Link> </Callout.Text></Callout>
For a more compact layout, place the icon inside the heading by adding the icon prop to Callout.Heading instead of the root Callout component.
import { NewspaperIcon } from '@fluxui-dev/react/icons';<Callout> <Callout.Heading icon={NewspaperIcon}>Policy update</Callout.Heading> <Callout.Text>We've updated our Terms of Service and Privacy Policy. Please review them to stay informed.</Callout.Text></Callout>
Add action buttons to your callout with the actions prop to provide users with clear next steps.
import { Button, Callout } from '@fluxui-dev/react';<Callout icon={ClockIcon} actions={ <> <Button>Renew now</Button> <Button variant="ghost" href="/pricing">View plans</Button> </> }> <Callout.Heading>Subscription expiring soon</Callout.Heading> <Callout.Text>Your current plan will expire in 3 days. Renew now to avoid service interruption and continue accessing premium features.</Callout.Text></Callout>
Use the inline prop to display actions inline with the callout.
import { CubeIcon, ExclamationTriangleIcon } from '@fluxui-dev/react/icons';<Callout icon={CubeIcon} variant="secondary" inline actions={ <> <Button>Track order →</Button> <Button variant="ghost">Reschedule</Button> </> }> <Callout.Heading>Your package is delayed</Callout.Heading></Callout><Callout icon={ExclamationTriangleIcon} variant="secondary" inline actions={<Button>Update billing</Button>}> <Callout.Heading>Payment issue detected</Callout.Heading> <Callout.Text>Your last payment attempt failed. Update your billing details to prevent service interruption.</Callout.Text></Callout>
Add a close button, using the controls prop, to allow users to dismiss callouts they no longer care to see.
import { useState } from 'react';import { Text } from '@fluxui-dev/react';import { BellIcon, FingerPrintIcon, XMarkIcon } from '@fluxui-dev/react/icons';const [meetingVisible, setMeetingVisible] = useState(true);const [loginVisible, setLoginVisible] = useState(true);{meetingVisible && ( <Callout icon={BellIcon} variant="secondary" inline controls={<Button icon={XMarkIcon} variant="ghost" aria-label="Dismiss" onClick={() => setMeetingVisible(false)} />} > <Callout.Heading className="flex gap-2 @max-md:flex-col items-start">Upcoming meeting <Text>10:00 AM</Text></Callout.Heading> </Callout>)}{loginVisible && ( <Callout icon={FingerPrintIcon} variant="secondary" actions={ <> <Button>Change password</Button> <Button variant="ghost">Review activity</Button> </> } controls={<Button icon={XMarkIcon} variant="ghost" aria-label="Dismiss" onClick={() => setLoginVisible(false)} />} > <Callout.Heading>Unusual login attempt</Callout.Heading> <Callout.Text>We detected a login from a new device in <span className="font-medium text-zinc-800 dark:text-white">New York, USA</span>. If this was you, no action is needed. If not, secure your account immediately.</Callout.Text> </Callout>)}
Use predefined variants to convey a specific tone or level of urgency.
import { CheckCircleIcon, ExclamationCircleIcon, InformationCircleIcon, XCircleIcon } from '@fluxui-dev/react/icons';<Callout variant="secondary" icon={InformationCircleIcon} heading="Your account has been successfully created." /><Callout variant="success" icon={CheckCircleIcon} heading="Your account is verified and ready to use." /><Callout variant="warning" icon={ExclamationCircleIcon} heading="Please verify your account to unlock all features." /><Callout variant="danger" icon={XCircleIcon} heading="Something went wrong. Try again or contact support." />
Use the color prop to change the color of the callout to match your use case.
<Callout color="zinc" ... /><Callout color="red" ... /><Callout color="orange" ... /><Callout color="amber" ... /><Callout color="yellow" ... /><Callout color="lime" ... /><Callout color="green" ... /><Callout color="emerald" ... /><Callout color="teal" ... /><Callout color="cyan" ... /><Callout color="sky" ... /><Callout color="blue" ... /><Callout color="indigo" ... /><Callout color="violet" ... /><Callout color="purple" ... /><Callout color="fuchsia" ... /><Callout color="pink" ... /><Callout color="rose" ... />
Call attention to a new feature or update.
<Callout icon={SparklesIcon} color="purple"> <Callout.Heading>Have a question?</Callout.Heading> <Callout.Text> Try our new AI assistant, Jeffrey. Let him handle tasks and answer questions for you.{' '} <Callout.Link href="#">Learn more</Callout.Link> </Callout.Text></Callout>
Encourage users to upgrade.
<Callout icon={ShieldCheckIcon} color="blue" inline actions={<Button>Upgrade to Pro →</Button>}> <Callout.Heading>API access is restricted</Callout.Heading> <Callout.Text>Get access to all of our premium features and benefits.</Callout.Text></Callout>
Compact reminders to take advantage of special offers.
<Callout icon={BanknotesIcon} color="lime" inline actions={<Button>Switch now →</Button>}> <Callout.Heading>You could save $4,900/yr on annual billing.</Callout.Heading></Callout>
Nudge users toward an action or feature.
import { Badge, Button, Callout } from '@fluxui-dev/react';<Callout variant="secondary" icon={UserGroupIcon} actions={ <> <Button>Invite member</Button> <Button variant="ghost" className="@max-md:hidden">Manage team</Button> </> }> <Callout.Heading> Team collaboration <Badge color="purple" size="sm" inset="top bottom">Available with Pro</Badge> </Callout.Heading> <Callout.Text> <p>Share projects, manage permissions, and collaborate in real time with your team. Upgrade now to access these features.</p> </Callout.Text></Callout>
|
Prop
|
Description
|
|---|---|
| icon |
Icon displayed next to the heading: a component, such as ClockIcon from @fluxui-dev/react/icons, or an element, such as <img />, rendered as is.
|
| iconVariant |
Variant of the icon displayed next to the heading (e.g., outline). Explore icon variants
|
| variant |
Options: default, secondary, success, warning, danger. Default: default.
|
| color |
|
| inline |
If true, actions appear inline. Default: false.
|
| heading |
Shorthand for Callout.Heading.
|
| text |
Shorthand for Callout.Text.
|
| actions |
Buttons or links inside the callout.
|
| controls |
Extra UI elements placed at the top right of the callout (e.g., close button).
|
|
CSS
|
Description
|
|---|---|
| className |
Additional CSS classes applied to the callout.
|
| actionsClassName |
CSS classes applied to the element around the actions, such as gap-4.
|
| controlsClassName |
CSS classes applied to the element around the controls.
|
|
Attribute
|
Description
|
|---|---|
| data-flux-callout |
Applied to the root element for styling and identification.
|
|
Prop
|
Description
|
|---|---|
| icon |
Moves the icon inside the heading instead of the callout root.
|
| iconVariant |
Variant of the icon displayed next to the heading (e.g., outline). Explore icon variants
|
|
Prop
|
Description
|
|---|---|
| href |
The URL the link points to. An in-app URL navigates through the link registered in FluxProvider.
|
| external |
If true, the link opens in a new tab. Default: false.
|
| render |
Element to render instead of the a tag (such as a router link with props href can't carry), with the link's props merged in.
|