Tabs
You can display a tabbed interface using the <Tabs>
and <TabItem>
components. Each <TabItem>
must have a label
to display to users. Use the optional icon
attribute to include one of Starlight’s built-in icons next to the label.
Example
Sirius, Vega, Betelgeuse
Io, Europa, Ganymede
Properties
SyncKey
Keep multiple tab groups synchronized by adding the syncKey
attribute.
All <Tabs>
with the same syncKey
value will display the same active label. This allows your reader to choose once (e.g. their operating system or package manager), and see their choice persisted across page navigations.
To synchronize related tabs, add an identical syncKey
property to each <Tabs>
component and ensure that they all use the same <TabItem>
labels:
Some stars:
Bellatrix, Rigel, Betelgeuse
Pollux, Castor A, Castor B
Some exoplanets:
HD 34445 b, Gliese 179 b, Wasp-82 b
Pollux b, HAT-P-24b, HD 50554 b
Keystatic config
To add this Starlight component as a Keystatic content component, register it as a content component with the following schema: