Callout
Inline tinted message in the page flow: info, success, warning, danger.
Code
import * as React from 'react';
import { Callout } from '@fruit-labs/design';
export default function Demo() {
return (
<div
style={{
display: 'flex',
flexDirection: 'column',
gap: 10,
maxWidth: 440,
}}
>
<Callout title="Heads up">Sync resumes when you’re back on Wi-Fi.</Callout>
<Callout tone="success" title="All set">
Your changes are saved.
</Callout>
<Callout tone="warning" title="Storage almost full">
Free up space to keep backing up.
</Callout>
<Callout tone="danger" title="Upload failed">
Check your connection and try again.
</Callout>
</div>
);
}Tones
import { Callout } from '@fruit-labs/design';
export default function Example() {
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: 12, maxWidth: 560 }}>
<Callout tone="success" title="Domain verified">Mail will now be delivered.</Callout>
<Callout tone="danger" title="Payment failed">Update your card to keep access.</Callout>
</div>
);
}Install
From npm:
npm install @fruit-labs/design
import { Callout } from '@fruit-labs/design';Or copy the TypeScript source into your project:
npx shadcn@latest add https://design.fruitlabs.online/r/callout.jsonGuidelines
- Short title + one sentence. Danger callouts are announced (role=alert).
Props
| Prop | Type | Required |
|---|---|---|
tone | 'info' | 'success' | 'warning' | 'danger' | No |
title | React.ReactNode | No |
icon | string | No |
className | string | No |
children | React.ReactNode | No |