Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Vertical Tabs Lessons Learned Block for React

A lessons-learned section for a retrospectives tool: a vertical tab list of six post-mortems with the year each happened, and the open one as what happened, what we learned and what changed.

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 lessons-learned section for React with Base UI. A compact header sits over a master and detail: at the start a vertical list of six post-mortems, each a title with, in its margin, how long into the company's life it happened ("Year 2", never a calendar year); behind a divider that meets the band's top rule with a plus, the open lesson as a title with a badge and three labelled rows: what happened, what we learned and what changed. Every lesson is sized by an unseen copy, so choosing one never moves the page. On a phone the list becomes a row of chips that scrolls sideways above the lesson. It's built from Guides, Tabs and Badge, with CSS transitions for the entrance and your theme's tokens for every colour. For an about page, a company handbook or a "how we got here" page that admits mistakes in a form people can scan. The company and its lessons are invented for the example.

FAQ

How do I change the lessons?

Edit LESSONS at the top of the file: each has a title, a when label and the three texts, situation, learned and changed. A new lesson becomes a new row in the list and a new panel with no other change. Keep when relative ("Year 3", "Since our first customer") so the page doesn't age.

How do the tabs work with a keyboard?

The list is a vertical tab list: the Up and Down arrow keys move between the lessons, Home and End jump to the first and last, and Tab moves into the open lesson. The open one is marked by a bar at the start of its row and by the row's selected state, so it's not shown by colour alone.

Why doesn't the page move when I pick a lesson?

The lessons differ in length. An unseen, inert copy of every panel sits in the same grid cell as the open one, so the cell keeps the height of the tallest, and the hidden copies are out of the accessibility tree and the tab order.

How are the three rows built?

As a definition list: "What happened", "What we learned" and "What changed" are terms, and each text is its description, so a screen reader announces them as pairs. The rows are separated by hairlines drawn by the list itself.

How does it fit on a phone?

The list becomes a single row of chips that scrolls sideways inside its own band, with the open chip filled in your foreground colour; the year moves out of the chips and stays in the lesson's badge. The lesson sits under the chips. Nothing else scrolls sideways at 320 pixels.

What moves, and what happens with reduced motion?

The header and the tabs fade up once when the page loads, and the lesson's text fades in when you choose another. With reduced motion the entrances are off and the lesson swaps at once.

  • Pro

    Principles Rail About

    Principles and process

    A split about section for a release-management tool: a sticky title at the start, and six principles as stations on a hairline rail, each opening to what it means and how it shows up.

  • Pro

    An operating-principles section for an accounting-automation company: line tabs by situation, and under them the open situation's three rules as hairline rows, each with the question we ask.

  • Pro

    A company's key moments as a bubble plot on a time axis, each bubble sized and raised by impact with the three that changed the company filled in, and the same moments as a ruled ordered list beneath.

  • Pro

    A company's origin story as four long chapters of prose beside a sticky chapter index that follows the reader, turning into a row of chips on phones.

  • Pro

    A product's history as a version scrubber: a stepped slider from v1 to v6 grows a drawing of the app panel by panel while two notes say what changed and who it helped.

  • Pro

    Double Helix Company DNA

    Culture and values

    A company-DNA section for a survey tool: a hand-drawn double helix with five rungs in a framed figure, and a list of five traits that lights a rung and shows what the trait means and how it is hired for.