Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Live Parse Capabilities Features Block for React

A framed panel for a language-understanding API: three example sentences in a segmented control re-parse live into an intent, entities and a confidence, beside a ruled list of five measured capabilities.

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 live-parse feature section for React with Base UI, written for Parsewell, a fictional language-understanding API. It is not a bento: a framed panel, split in two by a divider with + marks on its corners, shows one product doing one thing. At the start, a segmented control picks one of three example sentences (a rescheduled visit, a refund, a table booking); the sentence is shown with its entities marked, and under it the API's answer: the intent, each entity with its label, a confidence meter and how long the parse took. At the end, a ruled list of five capabilities (intent accuracy, entity recall, typo tolerance, out-of-scope rejection and speed), each a figure over a meter bar. The three parses share one grid cell, so the panel keeps its height whichever is open, and a polite status line announces the intent after a change. It is built from Segment Group and Guides with CSS transitions and your theme's tokens, and there is no primary colour in it. For API and AI products that want to show their output, not describe it.

FAQ

How do I change the example sentences?

Edit EXAMPLES at the top of the file. Each example is an id, a label for the control, an intent, a confidence in tenths of a percent (982 shows as 98.2%) and its spans: the pieces of the sentence in order, where a span with an entity is marked in the sentence and listed under Entities with that label. The entity list is read from the spans, so the sentence and its answer can't disagree.

Where do the capability figures come from?

From CAPABILITIES, a list of labels and values in tenths of a percent. The figure and its bar are drawn from the same number, so they always match. Replace them with your own measurements and say on the page what they were measured on; the defaults are written for a held-out set of English sentences.

Does the panel jump when I pick another example?

No. All three parses are rendered in one grid cell, so the cell is as tall as the tallest, and the ones not shown are invisible, inert and hidden from assistive technology. Only the open parse is read out, and a visually hidden status line says which intent was found and with what confidence.

Is the control keyboard accessible?

Yes. The three examples are a segmented control named "Example sentence": Tab reaches it, the arrow keys move between the examples and the choice applies at once. Its focus ring is visible and the selected example is marked by the sliding indicator.

How does it fit on a phone?

The two halves stack, the parse first and the capability list under it, with a hairline between them. The segmented control scrolls sideways inside its own row if the three labels don't fit, and nothing else scrolls: the sentence wraps and the entities list stays in one column down to 320 px.

What moves, and what happens with reduced motion?

The header fades up once when the page loads, and the meter bars ease to their width when an example changes, both with CSS transitions. With reduced motion the transitions are off and everything appears in place.

  • Pro

    A code window in a framed figure with three language tabs, a copy button, and a Run button that shows a spinner and then a typed response panel, for a typed SDK.

  • Pro

    A job-queue dashboard drawn as a window in a hairline frame: a range control in its title bar re-draws the throughput line and re-reads the uptime and outcome figures, beside a seven-bar week.

  • Pro

    A bento for a docs-publishing platform with one flagship cell, a page editor drawn in greys with a pulsing Published status, beside a build-time stat and a version list, over three small cells, in one rounded outline of shared hairlines.

  • Pro

    A shipping-ops console drawn in greyscale with six numbered pins that open a popover on click, tap or Enter, and a legend of six rows in shared hairlines that opens the same popovers.

  • Pro

    Metric Hero Strip Features

    Metrics and charts

    Four metric-over-feature columns for a data-pipeline tool: a giant tabular figure and label, then the feature that makes it true, in one divided band under a centred header.

  • Pro

    A unified diff of one config file in a hairline frame, with + and - gutters in foreground weights, one caption beside each hunk, folded runs of unchanged lines that open in place, and a footer counting the changes.