Notice
Notice renders a status callout with an optional title and body. It is fully static — no JavaScript — and maps its variants onto the helical-ui success/warn/danger/info theme tokens. Use the framework selector to switch implementations.
A plain notice with just a body.
A plain notice with just a body.
// apps/docs/src/components/examples/notice/default/react.tsx
import { Notice } from '@cloudvoyant/helical-react';
export default function ReactNoticeDefault() {
return <Notice variant="none">A plain notice with just a body.</Notice>;
}<!-- apps/docs/src/components/examples/notice/default/svelte.svelte -->
<script lang="ts">
import { Notice } from '@cloudvoyant/helical-svelte';
</script>
<Notice variant="none">A plain notice with just a body.</Notice>Examples
Omit Title
A warning notice that omits the title, leaving just the icon and body.
A warning notice that omits the title, leaving just the icon and body.
// apps/docs/src/components/examples/notice/omit-title/react.tsx
import { Notice } from '@cloudvoyant/helical-react';
export default function ReactNoticeOmitTitle() {
return <Notice variant="warning">A warning notice that omits the title, leaving just the icon and body.</Notice>;
}<!-- apps/docs/src/components/examples/notice/omit-title/svelte.svelte -->
<script lang="ts">
import { Notice } from '@cloudvoyant/helical-svelte';
</script>
<Notice variant="warning">A warning notice that omits the title, leaving just the icon and body.</Notice>Variants
Heads up
An informative notice with a title and body.
Deployed
The build succeeded.
No title — just a warning body.
Build failed
Check the logs for details.
Heads up
An informative notice with a title and body.
Deployed
The build succeeded.
No title — just a warning body.
Build failed
Check the logs for details.
// apps/docs/src/components/examples/notice/variants/react.tsx
import { Notice } from '@cloudvoyant/helical-react';
export default function ReactNoticeVariants() {
return (
<div className="flex flex-col gap-2">
<Notice variant="info" title="Heads up">
An informative notice with a title and body.
</Notice>
<Notice variant="success" title="Deployed">
The build succeeded.
</Notice>
<Notice variant="warning">No title — just a warning body.</Notice>
<Notice variant="error" title="Build failed">
Check the logs for details.
</Notice>
</div>
);
}<!-- apps/docs/src/components/examples/notice/variants/svelte.svelte -->
<script lang="ts">
import { Notice } from '@cloudvoyant/helical-svelte';
</script>
<div class="flex flex-col gap-2">
<Notice variant="info" title="Heads up">An informative notice with a title and body.</Notice>
<Notice variant="success" title="Deployed">The build succeeded.</Notice>
<Notice variant="warning">No title — just a warning body.</Notice>
<Notice variant="error" title="Build failed">Check the logs for details.</Notice>
</div>API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
variant |
'info' | 'success' | 'warning' | 'error' | 'none' |
'info' |
Status variant; none omits the icon. |
title |
string |
— | Optional heading. |
children |
ReactNode |
— | Body content. |