Skip to content

This page demonstrates the TagsList component, which renders a collection of tags with customizable layouts and sorting.

Display all tags in the system:

import { TagsList } from 'starlight-tags/components';
<TagsList limit={8} />

Tags flow horizontally and wrap:

<TagsList layout="inline" />

Tags in a responsive grid:

<TagsList layout="grid" />

Tags stacked vertically:

<TagsList layout="list" />

Add a heading above the tags:

Related Topics

<TagsList title="Related Topics" />

Show how many pages use each tag:

<TagsList showCount />

Display only specific tags by ID:

<TagsList tagIds={['configuration', 'guide', 'plugins', 'advanced']} />

Content Types

Audience

Integrations

Sort tags alphabetically:

<TagsList sortBy="name" />

Sort by number of pages using each tag (highest first):

<TagsList sortBy="count" showCount />

Grid layout with title, counts, and outline variant:

Popular Topics

<TagsList
title="Popular Topics"
layout="grid"
showCount
variant="outline"
limit={6}
/>

See the TagsList documentation for full API reference.