Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Chapter Outline Features Block for Radix UI

A course outline laid out like a book's contents: eight numbered chapters in two ruled columns, each a collapsible row that opens to three sections, with read times and the reader's place.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A chapter outline for React with Radix UI, shown for Primerly, a course platform. The header says where the reader is ("Chapter 3 of 8") with a thin progress bar and one Shine Button to carry on. Under it, eight chapters sit in two columns of hairline rows with + marks, split by a single divider. Each row is a Collapsible: a numbered marker (a check once the chapter is read), the title, one line on what it covers, the read time in a Badge and a chevron. The current chapter starts open, showing its three sections. Rows stack into one column on a phone and the read time moves into the summary line. It's built from Collapsible, Badge, Progress, Shine Button and Guides, with your theme's tokens for every colour. For courses, guides, handbooks and any product whose docs are a sequence worth browsing before reading.

FAQ

How do I change the chapters?

Edit CHAPTERS at the top of the file: each entry has a title, a one-line summary, minutes and the three sections it opens to. CURRENT is the chapter the reader is on (1-based): the ones before it show a check, it starts open, and the header's progress and button follow it. The columns are the first four and the last four, so keep the list at eight, or change the two slices.

How do the rows work with a keyboard?

Each chapter's title is a real button inside an h3, so Tab reaches it, Enter and Space open and close it, and screen readers hear the heading and whether it is expanded. A chapter's state ("read" or "in progress") is added after its title for screen readers, since the marker beside it is decorative.

Which part is the collapsible?

It's our Collapsible on Radix UI: the content animates its height with CSS keyframes, and reduced motion turns them off.

Is the progress bar real?

It shows the reader's place, worked out from CURRENT and the number of chapters: three of eight is 38%. The bar is decorative, because the words "Chapter 3 of 8" beside it say the same thing, so it's hidden from screen readers. Wire both to your own progress data.

Why do the rows have lines and + marks?

The page's rails and top rule come from the Guides spine, so the block lines up with its neighbours in a stack. Each row draws its own top rule with Guides, which puts a + mark where it meets the rails and the divider. The last row draws no bottom rule, because the next block's top rule is the edge.

How does it fit on a phone?

The two columns become one list, and the read time moves from its Badge into the summary line so the title keeps its room. The header stacks, with the progress and the Shine Button under the sentence. Nothing scrolls sideways at 320 pixels.