Callouts
Callouts highlight important information, warnings, tips, and other notices.
Basic Callouts
Stardust provides six callout types:
Info
Info
This is an informational callout for general information.
<Info>
This is an informational callout for general information.
</Info>
Tip
đĄ Tip
This is a tip callout for helpful suggestions.
<Tip>
This is a tip callout for helpful suggestions.
</Tip>
Note
đ Note
This is a note callout for side notes and additional context.
<Note>
This is a note callout for side notes and additional context.
</Note>
Warning
â ī¸ Warning
This is a warning callout for important cautions.
<Warning>
This is a warning callout for important cautions.
</Warning>
Danger
đ¨ Danger
This is a danger callout for critical warnings and errors.
<Danger>
This is a danger callout for critical warnings and errors.
</Danger>
Success
â Success
This is a success callout for positive confirmations.
<Success>
This is a success callout for positive confirmations.
</Success>
Custom Titles
Override the default title with the title attribute:
Did you know?
You can customize the title of any callout using the title attribute.
<Info title="Did you know?">
You can customize the title of any callout using the `title` attribute.
</Info>
â ī¸ Breaking Change
The API signature has changed in version 2.0.
<Warning title="Breaking Change">
The API signature has changed in version 2.0.
</Warning>
Markdown Inside Callouts
Callouts support full Markdown syntax:
Formatting Support
<Info title="Formatting Support">
You can use **bold**, *italic*, `code`, and even:
- Lists
- With multiple items
And [links](https://example.com) too!
</Info>
Code Blocks in Callouts
đĄ Pro Tip
You can include code blocks inside callouts:
final result = await api.fetch();
print(result);
<Tip title="Pro Tip">
You can include code blocks inside callouts:
\`\`\`dart
final result = await api.fetch();
print(result);
\`\`\`
</Tip>
When to Use Each Type
| Type | Use For |
|---|---|
<Info> |
General information, facts, explanations |
<Tip> |
Helpful suggestions, best practices, shortcuts |
<Note> |
Side notes, additional context, clarifications |
<Warning> |
Important cautions, potential issues, deprecations |
<Danger> |
Critical warnings, destructive actions, security concerns |
<Success> |
Confirmations, completed steps, positive outcomes |
Best Practices
Keep callouts concise
Callouts work best when they're brief and scannable. If you have a lot of content, consider using regular prose or breaking it into multiple callouts.
Don't overuse callouts
If everything is highlighted, nothing stands out. Reserve callouts for genuinely important information.
Choose the right type
Use <Danger> sparingly â only for truly critical information. Overusing it diminishes its impact.