Components
Note
This is a note admonition. Use it to provide additional information that users should be aware of.
Installation
pnpm dlx shadcn@latest add https://deltacomponents.dev/r/admonition.jsonUsage
import { Admonition } from "@/components/ui/admonition"
export default function Example() {
return (
<Admonition type="warning" title="Important Notice">
This is a warning message that users should pay attention to.
</Admonition>
)
}Examples
Custom Icon
Override the default semantic icon by passing a Lucide React component (or any SVG component) to the icon prop.
Component admonition-custom-icon not found in registry.
Adomition Types
Use different types of admonitions to guide users through important information and improve documentation clarity:
Note
This is a note admonition. Use it to provide additional information that users should be aware of.
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
type | "note" | "tip" | "info" | "warning" | "danger" | "success" | "caution" | "note" | The type of admonition determining color and icon |
title | string | - | Optional title text displayed above the content |
children | ReactNode | - | The content to display inside the admonition |
icon | React.ComponentType | - | Custom icon component to override the default type icon |
className | string | - | Additional CSS classes |
Build Better User Experiences
Discover open source components that make the difference in your applications. Copy, paste, and customize to create exceptional user interfaces.
Browse components