Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Layered Stack Diagram Features Block for React

A flat stack ladder for an app platform: five bars from interface to infrastructure, each a step wider, linked by hover and focus to a list of what sits in every layer.

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 stack-diagram features section for React with Base UI. Five flat bars, Interface at the top to Infrastructure at the foot, sit in a hairline frame with + marks on its corners, each bar one step wider than the one above. Beside the frame a list gives every layer a name, a sentence and the parts that sit in it as outlined badges. Hover or focus a bar and its group in the list is lit; the list always shows all five layers, so nothing depends on the pointer. Below lg the list moves under the ladder and the bars run full width. It's built from Guides and Badge, with CSS for everything else, and it follows your theme. For platforms, frameworks and any product explained as layers that can be used alone or together.

FAQ

How do I change the layers?

Edit LAYERS at the top of the file: each layer has a name, a sentence, its parts and step, the bar's width from sm (one class per layer, widening by about a tenth each step). The bar's count of parts is the length of parts. Keep it to five or six layers: the frame is sized for them.

What do hover and focus do?

Pointing at a bar or tabbing to it makes it the active layer: the bar turns to the text colour and its group in the list gets a tint and a heavier title. Tapping a bar does the same on a touch screen. The state is plain useState, and the list shows every layer the whole time, so keyboard and screen reader users lose nothing.

Is it accessible?

The bars are real buttons in an ordered list, each named by its layer and count, with aria-pressed on the active one and a visible focus ring. The list is a second ordered list with a heading per layer. The frame's caption says which end is closest to users and which to hardware.

What changes on a phone?

The bars lose their stepped widths and run the full width of the frame, so each one is an easy target, and the list sits under the ladder with a hairline between them. The keyboard order is the same: bars first, then the list.

Why bars and not a pyramid?

A flat bar has room for a name and a count at every width, and a stack of trapezoids needs the text to fit its narrowest edge. The steps still read as layers resting on a wider base, without clipped labels.

Why is there no button?

The diagram and its list are the feature. Add a Shine Button under the list if the page needs a call to action here.

  • Pro

    A request path for an edge-routing layer: five hops on one wire with a dot travelling along it, the time each hop spends under it, and a latency-budget bar that sums them.

  • Pro

    An exploded isometric stack of three greyscale planes (data, logic, view) in CSS 3D, with a ruled list of the layers beside it: hovering, focusing or tapping a layer lifts its plane and outlines it.

  • Pro

    A hub and six connections around a solid ring for an integration hub: hovering, focusing or tapping a node writes its title and sentence into the hub.

  • Pro

    A feature index for a deploy tool: a large headline over a table of six features, each with a rollout meter and a channel badge, in bands that run from rail to rail.

  • Pro

    A bento of five features for an issue tracker, each cell drawn as the product at work: a live board with teammates' cursors, a pull request, a burndown, a triage rule and a typed SDK, in cells that share their hairlines.

  • Pro

    A two-line transit map for a customer-journey tool: six stations, one interchange where the Setup and Team lines meet, and a popover on every station.