new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Radix Primitives · all subjects

segmented-control

8 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Segmented Control basic structure

Segmented Control is composed of a Root component that contains Item components. The Root renders a toggle group for switching between different values or views, with each Item representing an individual value option.

Segmented Control inherits from Toggle Group

Segmented Control inherits props and functionality from the Toggle Group primitive and supports common margin props.

Segmented Control Root component

The Root component contains the items of the control. It accepts props including defaultValue for setting the initial selected value.

Segmented Control Item component

The Item component represents individual values of the control. Each Item requires a value prop to specify its value.

Segmented Control size prop values

The size prop accepts values of 1, 2, and 3 to control the size of the control.

Segmented Control variant prop values

The variant prop accepts 'surface' and 'classic' to control the visual style of the control.

Segmented Control radius prop values

The radius prop accepts values of 'none', 'small', 'medium', 'large', and 'full' to assign a specific radius value to the control.

Segmented Control example with defaultValue

Example code showing basic usage: <SegmentedControl.Root defaultValue="inbox"><SegmentedControl.Item value="inbox">Inbox</SegmentedControl.Item><SegmentedControl.Item value="drafts">Drafts</SegmentedControl.Item><SegmentedControl.Item value="sent">Sent</SegmentedControl.Item></SegmentedControl.Root>

Give your agent this brain