Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Skill Tree Branch Graph Features Block for React

A dependency tree of nine toggles for a modular SDK: switching a module on switches on what it needs, switching one off switches off what depends on it, and a counter and a bundle size follow.

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 dependency-tree features section for React with Base UI. A root module, Core, branches into Auth, Data and Realtime and those into five leaves, laid out from the start to the end in a framed figure. Each of the nine modules is a toggle button: switching one on switches on everything it needs, and switching one off switches off everything that needs it, so the tree can never be in a state that wouldn't build. Connectors are solid to a module that is on and dashed to one that is off. Beside the figure a counter reads "5 of 9 modules enabled" with a segmented bar and the bundle size, and a panel describes whichever module has focus or the pointer. Below lg the tree is an indented list with no connectors. It's built from Toggle, Badge, Data List, Sliding Number and Guides, with your theme's tokens for every colour. For SDKs, plugin systems and any product you assemble from parts that depend on one another.

FAQ

How do I change the modules?

Edit MODULES at the top of the file, in tree order: each has an id, a name, a sentence, a size in kilobytes and, except for the root, the id of the module it needs. The rules for switching on and off, the counter and the bundle size all come from that list. The layout draws three levels: the root, its children and theirs.

What exactly happens when I switch a module on or off?

Switching on adds the module and everything above it in the tree. Switching off removes the module and everything below it. Both are small pure functions (needs, dependants and toggled) that you can test on their own, so the tree never holds a module without what it needs.

How do I use it with a keyboard?

Every module is a button in the tab order: Enter or Space switches it. The arrow keys are a shortcut on top of that: Down and Up walk the list in tree order, the start-side arrow goes to a module's parent and the end-side arrow to its first child. Focus also fills the panel beside the tree, so a keyboard user sees the same detail a pointer does.

What does a screen reader read?

Each module is a toggle button with its name and whether it is pressed, inside a list named Modules. The counter is a live output, so switching a module reads "6 of 9 modules enabled", and the dashed or solid connectors are decoration that the pressed state already says.

What replaces the tree on a phone?

An indented list of the same toggles in the same order, with no connectors: a module's depth is its indent. Everything else, including the counter and the panel, is the same.

Does the tree mirror in right-to-left languages?

No: a tree keeps its direction, so the figure is dir="ltr". The header, the counter and the panel follow the page's direction.

  • Pro

    A hub with six tools around it joined by spokes that carry travelling dots, and a status list beside it: choosing a tool or hovering its row lights its spoke.

  • Pro

    A three-circle Venn diagram for a segment builder: seven zones with head counts, one radio group, a caption that names the chosen zone with a link to create it, and three legend cells.

  • Pro

    A features section for a knowledge base as a working tree: a rail of three categories and six features beside a detail panel with the selected feature's sentence, three ticks and a small drawing.

  • 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

    A split hero for a feature-flag service: the headline, a Shine Button and three ticks beside a narrow flags dashboard in a hairline frame, with environment tabs, rollout meters and a working switch on every flag.

  • Pro

    A notification matrix for an alerting product: five events by four channels, every cell a working Switch, a counter that rolls as you flip them and a footer that offers Save and Discard in reserved space.