Prose
Callout
Display important information with icons and variants for different message types.
Usage
The ProseCallout component is used to highlight important information, tips, warnings, and other contextual messages. It supports multiple variants, optional icons, and can even be turned into a clickable link.
Basic Example
Variants
The callout component comes with several pre-styled variants, each with its own default icon and color scheme.
Info
Success
Warning
Error
Tip
Cmd+K to open the command palette and quickly navigate to any file in your project.Note
Example
Filled Style
Use the filled prop to create a more prominent callout with solid background colors:
Custom Icons
Override the default icon for any variant:
With Title and Description
Clickable Callouts
Make callouts clickable by adding a url prop
Complex Content
Callouts support rich content including lists, code, and formatting
- Install the package:
npm install my-package - Import in your app:
import { MyComponent } from 'my-package' - Use the component:
<MyComponent />
- Keep your components small and focused
- Write tests for critical functionality
- Use TypeScript for better type safety
- Document your code with JSDoc comments
Vue Component Usage
You can also use the Callout component in your Vue files:
All Variants
Filled Style
With Slots
- Custom icon slot
- Custom title slot
- Custom content slot
Clickable Callout
Custom Icons
Styling
The component uses Tailwind Variants for styling. You can override any part using the class props:
<Callout
variant="info"
title="Custom Styles"
class="rounded-xl shadow-lg"
title-class="text-xl font-bold"
description-class="text-base"
icon-class="size-6"
>
Fully customizable styling
</Callout>
Examples in Context
Documentation Page
Migration Guide
Breaking Changes in v2.0
The following breaking changes require updates to your code:themeprop renamed tovariantcolorprop removed (usevariantinstead)- Default icon size changed from 20px to 24px
API Documentation
Tutorial
Cmd + / to quickly toggle comments in your code editor.Error Handling
Prose Callout API
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
variant | any | "default" | No | The variant style of the callout |
target | "_self" | "_blank" | "_parent" | "_top" | "_self" | No | Link target (_blank for external links) |
title | string | — | No | The title of the callout |
description | string | — | No | The description/content of the callout |
icon | string | — | No | The icon to display |
url | string | — | No | Optional URL to make the callout clickable |
titleClass | ClassValue | — | No | Additional class for the title |
descriptionClass | ClassValue | — | No | Additional class for the description |
iconClass | ClassValue | — | No | Additional class for the icon |
filled | boolean | false | No | Whether to use filled style |