Badges are a built-in component provided by Starlight.
import { Badge } from '~/components'; <Badge text="New" variant="tip" size="small" /><Badge text="Deprecated" variant="caution" size="medium" /><Badge text="Starlight" variant="note" size="large" /><Badge text="Custom" variant="success" style={{ fontStyle: 'italic' }} />
Badges can be added to the sidebar via page frontmatter.
---title: Hello Worldsidebar: badge: variant: tip text: New---