Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Values Cloud About Block for React

A cloud of nine values for a writing app, sized by how often each wins when two disagree: pick a pill in a framed tray and a band under it says what the value means and what it costs us.

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 values cloud for React with Base UI, written for Wordhaven, a fictional writing app. Nine values are pills in a tray framed with + marks on its corners; three are large, three medium and three small, and the header says what the size means: when two values disagree, the bigger one wins. The pills are one toggle group. Pressing one turns it to your foreground colour and shows its definition in a band under the tray, in two columns: what it means, and what it costs us. The costs are the point: a value that costs nothing is only a word. Pressing the pressed pill keeps it, so a definition always shows. All the definitions share one grid cell and only the picked one is visible, so choosing never moves the page. It's built from Guides and Toggle Group with your theme's tokens and a CSS entrance. For about pages that need more than a list of nice words. The values and their costs are example copy.

FAQ

How do I change the values and their sizes?

Each value is an entry in VALUES at the top of the file with a word, a weight of large, medium or small, what it means and what it costs. The pill's padding and type size come from its weight in PILL_SIZES. The first entry is the one that shows when the page loads. Keep the definitions to a sentence or two: the band is as tall as the longest one, in every state.

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

Every definition is rendered in the same grid cell, one over another, and the ones that aren't picked are invisible and inert, so they are out of the reading order and the Tab order but still give the cell its height. The band is therefore the height of the longest definition at the current width, and picking never reflows the block.

How do screen readers and keyboards handle it?

The pills are a toggle group named "Values": each is a toggle button whose pressed state is announced. The picked definition is an h3 with a description list under it, and after the first pick a polite status line reads the definition out; nothing is announced on load. The unpicked definitions are removed from the accessibility tree.

How are the other values dimmed?

At rest a pill has muted text on a plain outline, and the picked one is filled with your foreground colour, so the picked value stands out by weight and contrast without opacity, and the text of the others stays readable. The pills use no primary colour: this block has no action.

How is the tray framed?

A Guides layer draws the frame around the tray and the band, with its lines overshooting the corners and a + on each, and a second one draws the rule between the tray and the definition. The frame is inset from the page's rails and at most 768 pixels wide, so it reads as a figure on the page and the block ends on content, not on a rule.

How does it fit on a phone?

The pills wrap and stay centred, so the tray gets taller instead of wider, and the two columns of the definition stack. Pills never truncate, and nothing scrolls sideways at 320 pixels. The header and the tray fade up once on load with a CSS transition; with reduced motion they simply appear.

  • Pro

    Values Bento About

    Culture and values

    A bento of six values for a community-forum company: three tall cells that each carry a story of what the value looked like in a nested quote, and three one-line cells stacked beside them, in shared hairlines.

  • Pro

    Values Slider About

    Culture and values

    A carousel of six values for an HR platform, one per slide in a band from rail to rail: the value, a practice example and one figure side by side, with Previous and Next buttons, a counter and dots.

  • 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

    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.

  • Pro

    A mission held up by four pillars for a civic-software company: cells that share their hairlines, each with its numeral, a sentence, three initiatives with shipped and in-progress marks, and a progress bar counted from the list.

  • Pro

    Culture Behaviors About

    Culture and values

    Two equal halves split by a hairline, what a feedback-tool company celebrates and what it discourages, each as rows with the behaviour and what it sounds like in quotes, marked with a plus and a minus, never a colour.