Skip to content

Aside

Example source

page.mdx
import Aside from 'starlight-plugin-icons/components/Aside.astro'
<Aside type="note">
Helpful tip content.
You can use <span class="i-ph:markdown-logo-bold"></span> **Markdown** inside.
</Aside>

Rendered

Supported values for type:

You can override the icon via the icon prop or rely on the default for each type.

  • type? one of note | tip | caution | danger (default: note)
  • title? string — text label and visible heading (defaults to a localized title by type)
  • icon? string — Iconify class (overrides the default type icon)
  • class? string — additional CSS classes
  • starlight-aside
  • starlight-aside--${type}
  • starlight-aside__title
  • starlight-aside__icon
  • starlight-aside__content

Starlight also allows using CSS variables to customize the aside component.

page.mdx
import Aside from 'starlight-plugin-icons/components/Aside.astro'
<Aside type="tip" icon="i-ph:lightbulb-duotone">Custom icon</Aside>
src/styles/custom.css
.starlight-aside--tip {
--sl-color-asides-text-accent: var(--sl-color-green-high);
--sl-color-asides-border: var(--sl-color-green);
background-color: var(--sl-color-green-low);
}

Rendered