shadcn.io is not affiliated with official shadcn/ui
Chapter Outline Features Block for Solid
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.
Installation
Overview
A chapter outline for Solid with Ark 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, built on Ark UI: the trigger, the content and the chevron indicator. The content animates its height with CSS and stops animating under reduced motion.
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.
Related
- Vertical Tab Accordion Preview FeaturesTabs and accordions
- Accordion FAQ FeaturesTabs and accordions
- Timeline Evolution Story FeaturesTimelines and steps
- Hover Accordion Mockup Split FeaturesTabs and accordions
- 123Centered Three-Step Process HeroUpdates and timelines
- Boarding Pass Ticket Stub FeaturesDocuments and objects