Aside
Example source
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
Variants
Section titled “Variants”Supported values for type
:
Customization
Section titled “Customization”You can override the icon via the icon
prop or rely on the default for each type.
type?
one ofnote | 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
Classes
Section titled “Classes”starlight-aside
starlight-aside--${type}
starlight-aside__title
starlight-aside__icon
starlight-aside__content
Example
Section titled “Example”Starlight also allows using CSS variables to customize the aside component.
import Aside from 'starlight-plugin-icons/components/Aside.astro'
<Aside type="tip" icon="i-ph:lightbulb-duotone">Custom icon</Aside>
.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