Callouts & Asides
The <Aside> component (often referred to as an admonition or callout) is used to draw attention to supplementary information, warnings, or helpful shortcuts without disrupting the main narrative flow of the document.
How to Write Asides
Section titled “How to Write Asides”Use asides to call out critical notes, warnings, or tips without disrupting the main narrative:
- Import the Aside: Include
import { Aside } from '@astrojs/starlight/components';at the top of your document. - Choose a Variant: Set the
typeattribute tonote,tip,caution, ordangerdepending on severity. - Keep it Concise: Write short, direct warnings inside the aside block.
Behind the Curtain
Section titled “Behind the Curtain”Explore the live specimens of all four aside variants, the raw markup required to build them, and instructions for authoring this component inside Sveltia CMS.
Below are the four available variants of the Aside component, including an example of how to override the default label with a custom title.
Notice how the type attribute changes the color and icon. The title attribute is optional and overrides the default uppercase label.
<Aside type="note"> **Default (Note):** Used for general information, context, or trivia that is helpful but not critical to completing a task.</Aside>
<Aside type="tip"> **Tip:** Used for shortcuts, best practices, or alternative ways to accomplish a workflow more efficiently.</Aside>
<Aside type="caution"> **Caution:** Used to warn the user about potential edge cases, minor data loss, or tricky steps where mistakes commonly happen.</Aside>
<Aside title="Do not skip this step" type="danger"> **Danger (with custom title):** Used for critical warnings, permanent data loss, or severe security risks.</Aside>How writers add this component using the Sveltia CMS visual interface.
Thanks to the custom aside widget registered in public/admin/index.html, writers can insert these blocks visually without memorizing the component props.
In Rich Text Mode:
- Click the + (Add Block) button in the editor toolbar.
- Select Starlight Aside / Callout from the dropdown menu.
- Use the visual dropdown to select the Type (
note,tip,caution,danger). - (Optional) Enter a custom Title.
- Type your Markdown content into the Callout Content field.
In Raw Markdown Mode:
Use standard JSX tags: <Aside type="caution" title="Optional Title">Your content here.</Aside>
For a complete step-by-step walkthrough of visual component insertion, see Inserting Custom Components (CMS Magic).
Technical Writing Guidelines
Section titled “Technical Writing Guidelines”When utilizing callouts in this knowledge base, adhere to the following stylistic rules:
- Avoid Callout Fatigue: Do not stack multiple asides directly on top of each other. If a page consists primarily of callouts, that information belongs in the main body text instead.
- Keep it Concise: An aside should rarely be longer than two sentences. If you need paragraphs of explanation, weave it into the main narrative.
- Use the Right Severity:
- Never use
dangerfor simple tips just to grab visual attention. - Reserve
dangerstrictly for irreversible actions (e.g., deleting a database, exposing a secret key).
- Never use
- Write Action-Oriented Titles: If you override the default title (e.g., “Note” or “Caution”), make the custom title descriptive and actionable (e.g.,
title="Back up your files first"instead oftitle="Important").
