Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Segmented Tab Split Frame Features Block for React

A features section for a performance budget tool: pill tabs swap both panes of one framed view, a text pane with the counts and a bar chart that a budget slider cuts across.

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 features section for React with Base UI, where one control changes a whole view. Under a compact header, three pill tabs (Performance, Security and Analytics) switch a framed view split in two by a hairline. The start pane says what the budget is for and how many routes are over it; the end pane draws every route of Perfwell, a performance budget tool, as a bar, with a slider under the bars that sets the budget. A line follows the slider across the bars, a bar past it turns solid, and the counts update as you drag. It's tabs, a slider, a sliding number, a badge and the Guides line kit, with your theme's tokens for every colour and no button. For any product that sets limits and shows who breaks them.

FAQ

How do I change the budgets and the routes?

Edit BUDGETS at the top of the file. Each tab is one object: a label, a title, a sentence, the unit, the slider's range and step, its starting budget and a list of routes with a value each. Add a tab and it appears in the header and the frame. Every count, the worst route, the median and the bar widths are worked out from that list, so they always agree with the bars.

When does a bar count as over budget?

When its value is past the budget: a route that sits exactly on the budget is within it. Over-budget bars turn solid and their values turn bold, and a screen reader hears "over budget" after their value, so the state is not carried by colour alone.

Can I use the slider with a keyboard, and does it announce changes?

Yes. Tab to the thumb and the arrow keys move it one step, with Page Up, Page Down, Home and End for larger jumps. The visible counts update as it moves, but a screen reader is told the new count only when a move ends, so a drag doesn't produce a stream of announcements.

Does each tab remember its budget?

No. Only the open tab is drawn, so switching away and back starts that tab at its own starting budget again. If you want each tab to keep what you set, lift the budget into the parent component's state, one value per tab.

Does the frame change size between tabs?

The three tabs have the same structure, so the frame keeps nearly the same height: the sentence reserves its lines and every tab has six routes. Keep that when you add a tab, or the page below will move as people switch.

How does it fit on a phone?

The tabs stay in one row (and scroll sideways if a translation is longer), the text pane comes first and the chart sits under it behind a hairline. The slider spans the width of the bars, so it is easy to drag with a thumb.

  • Pro

    A features section where four pills pick the one metric a flagship card shows: a giant rolling number with a delta badge and three ticks beside a 24-hour area chart.

  • Pro

    A features section for a release tool: a line tab switch (Plan, Ship, Review) that swaps one split band, with a drawing flush to the start rail and the copy on the end side.

  • Pro

    A features section for a contract-signing tool: pill tabs over one framed card whose contract drawing changes with the stage, a signature field that fills when you press Sign, and the copy under it in two columns.

  • Pro

    A features section for an email-automation product: a pill segment control swaps three accordion steps (draft, send, measure), and each open step shows its own small drawing beside its text.

  • Pro

    A features section for a block editor: a segmented control picks a job, an accordion lists its four features, and the one editor screen beside it rings and spotlights the part of the page the open row names.

  • Pro

    Accordion FAQ Features

    Tabs and accordions

    A features section for an API gateway told as six capability questions in an accordion beside a sticky side header, each answer a sentence and a small drawing of the capability at work.