Clawscale

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.

New schema version
orders_daily v14 adds the fulfillment_region column.
Sync complete
1,204,331 rows loaded from us-east-1 in 3 minutes.
Quota at 85%
The analytics warehouse throttles queries above 100%.
Pipeline failed
ingest-orders stopped at step 3 of 5. Check the run log.
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.

Showing cached results from 09:40 UTC.
Partial results
2 of 14 shards timed out. Totals may be low.
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.
Credentials expire in 2 days
Rotate the warehouse key before Friday to keep syncs running.
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#

Replication lag
eu-west-1 is 42 seconds behind the primary. Reads from this region may be stale.
Props
Open dropdown
View source on GitHub

Props interface#

Callout also accepts the HTML attributes of a div.

interface CalloutProps extends IntentProps, Props, HTMLDivProps@clawscale/react

This component also supports the full range of HTML <div> attributes.

PropsDescription
children
React.ReactNode
Callout contents.
className
string
A space-delimited list of class names to pass along to a child element.
Inherited from Props
compact
boolean
Whether to use a compact appearance, which reduces the visual padding around callout content.
icon
IconName | MaybeElement
Name of a Blueprint UI icon (or an icon element) to render on the left side.
intent
Intent
Visual intent color to apply to background, title, and icon.
minimal
boolean = false
Whether the callout should have a minimal appearance with no background color fill.
title
string
String content of optional title element.