BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/figui/segmented-control

Segmented Control

figui/segmented-control
FreeComponent

A segmented control component

Live preview

live · rendered by the registry
Rendered by figui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://figui.dev/r/segmented-control.json

Source

registry/ui3/ui/segmented-control.tsxfigui.dev/r/segmented-control.json
1import * as React from "react";
2import { Radio } from "@base-ui/react/radio";
3import { RadioGroup } from "@base-ui/react/radio-group";
4import { cn } from "@/lib/utils";
5
6function SegmentedControl({ className, ...props }: RadioGroup.Props) {
7 return (
8 <RadioGroup
9 className={cn("flex w-fit rounded-md bg-grey-100 dark:bg-grey-700", className)}
10 {...props}
11 >
12 {props.children}
13 </RadioGroup>
14 );
15}
16
17function SegmentedControlItem({ className, children, ...props }: Radio.Root.Props) {
18 return (
19 <Radio.Root
20 className={cn(
21 "typography-body-medium flex h-6 cursor-default items-center justify-center rounded-md px-2 text-center text-black-500 outline-none select-none focus-visible:inset-ring focus-visible:inset-ring-blue-500 data-checked:border-grey-200 data-checked:bg-white-1000 data-checked:text-black-1000 data-checked:inset-ring data-checked:inset-ring-grey-200 focus-visible:data-checked:inset-ring-blue-500 data-disabled:text-black-400 dark:text-white-500 dark:data-checked:bg-grey-800 dark:data-checked:text-white-1000 dark:data-checked:inset-ring-grey-600 dark:data-disabled:text-white-400",
22 className,
23 )}
24 {...props}
25 >
26 {children}
27 </Radio.Root>
28 );
29}
30
31export { SegmentedControl, SegmentedControlItem };

What it pulls in

npm packages

  • @base-ui/react

Files it writes

  • registry/ui3/ui/segmented-control.tsx

Facts

Registry
figui
Type
registry:component
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

Docs on figui figui.dev anxndsgn/FigUI on GitHub Raw registry item This item as JSON

More from figui

All 12 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
ButtonbuttonfiguiComponentsFreeno deps
CheckboxcheckboxfiguiComponentsFreeno deps
InputinputfiguiComponentsFree2 deps · 6 files
MenumenufiguiComponentsFree1 dep
RadioradiofiguiComponentsFreeno deps
SelectselectfiguiComponentsFreeno deps
SeparatorseparatorfiguiComponentsFreeno deps
SlidersliderfiguiComponentsFree2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex