Callout
A Callout highlights information the reader should not miss. It holds an optional title, an icon and any content.
Usage#
import { Callout } from "@clawscale/react";<Callout intent="warning" title="Quota at 85%">
The warehouse throttles queries above 100%.
</Callout>Examples#
Basic#
title renders a heading above the content.
Backfill scheduled
The orders_daily backfill starts at 02:00 UTC and takes about 40 minutes. Queries on this dataset may return partial results until it finishes.import { Callout } from "@clawscale/react";
export default function CalloutBasic() {
return (
<Callout title="Backfill scheduled">
The orders_daily backfill starts at 02:00 UTC and takes about 40 minutes. Queries on this dataset may return
partial results until it finishes.
</Callout>
);
}Intent#
intent sets the color and a matching icon. Set icon to replace the icon, or icon={null} to remove it.
import { Callout } from "@clawscale/react";
export default function CalloutIntent() {
return (
<>
<Callout intent="primary" title="New schema version">
orders_daily v14 adds the fulfillment_region column.
</Callout>
<Callout intent="success" title="Sync complete">
1,204,331 rows loaded from us-east-1 in 3 minutes.
</Callout>
<Callout intent="warning" title="Quota at 85%">
The analytics warehouse throttles queries above 100%.
</Callout>
<Callout intent="danger" title="Pipeline failed">
ingest-orders stopped at step 3 of 5. Check the run log.
</Callout>
</>
);
}Compact#
compact reduces the padding. Use it in dense panels and forms.
import { Callout } from "@clawscale/react";
export default function CalloutCompact() {
return (
<>
<Callout compact intent="primary">
Showing cached results from 09:40 UTC.
</Callout>
<Callout compact intent="warning" title="Partial results">
2 of 14 shards timed out. Totals may be low.
</Callout>
</>
);
}Minimal#
minimal removes the background fill, for notes that should not compete with the content around them.
Read only
This dataset is managed by the finance team.import { Callout } from "@clawscale/react";
export default function CalloutMinimal() {
return (
<>
<Callout minimal title="Read only">
This dataset is managed by the finance team.
</Callout>
<Callout minimal intent="danger" title="Credentials expire in 2 days">
Rotate the warehouse key before Friday to keep syncs running.
</Callout>
</>
);
}Interactive playground#
Props interface#
Callout also accepts the HTML attributes of a div.
interface CalloutProps extends IntentProps, Props, HTMLDivProps@clawscale/reactThis component also supports the full range of HTML <div> attributes.
| Props | Description |
|---|---|
children | React.ReactNodeCallout contents. |
className | stringA space-delimited list of class names to pass along to a child element. Inherited from Props |
compact | booleanWhether to use a compact appearance, which reduces the visual padding around callout content. |
icon | IconName | MaybeElementName of a Blueprint UI icon (or an icon element) to render on the left side. |
intent | IntentVisual intent color to apply to background, title, and icon. |
minimal | boolean = falseWhether the callout should have a minimal appearance with no background color fill. |
title | stringString content of optional title element. |