BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/blok/radio-group

Radio group

blok/radio-group
FreeComponent

A set of checkable buttons—known as radio buttons—where no more than one of the buttons can be checked at a time.

Install it

npx shadcn@latest add https://blok.sitecore.com/r/radio-group.json

Source

src/components/ui/radio-group.tsxblok.sitecore.com/r/radio-group.json
1"use client";
2
3import { Icon } from "@/lib/icon";
4import { mdiCircle } from "@mdi/js";
5import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
6import type * as React from "react";
7
8import { cn } from "@/lib/utils";
9
10function RadioGroup({
11 className,
12 ...props
13}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
14 return (
15 <RadioGroupPrimitive.Root
16 data-slot="radio-group"
17 className={cn("grid gap-3", className)}
18 {...props}
19 />
20 );
21}
22
23function RadioGroupItem({
24 className,
25 ...props
26}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
27 return (
28 <RadioGroupPrimitive.Item
29 data-slot="radio-group-item"
30 className={cn(
31 "border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border transition-[color] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
32 className,
33 )}
34 aria-label={
35 props["aria-label"] || props["aria-labelledby"]
36 ? undefined
37 : "Radio button"
38 }
39 {...props}
40 >
41 <RadioGroupPrimitive.Indicator
42 data-slot="radio-group-indicator"
43 className="relative flex items-center justify-center"
44 >
45 <Icon path={mdiCircle} size={0.8} />
46 </RadioGroupPrimitive.Indicator>
47 </RadioGroupPrimitive.Item>
48 );
49}
50
51export { RadioGroup, RadioGroupItem };

What it pulls in

npm packages

  • radix-ui
  • @mdi/js

Other registry items

  • https://blok.sitecore.com/r/theme.json

Files it writes

  • src/components/ui/radio-group.tsx
  • src/lib/icon.tsx

Facts

Registry
blok
Type
registry:ui
Access
Free
Files written
2
Licence
NOASSERTION
First indexed
2026-08-03
Last confirmed
today

Go to the source

blok.sitecore.com Sitecore/blok on GitHub Raw registry item This item as JSON

More from blok

All 72 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionblokComponentsFree2 deps · 2 files
Action baraction-barblokComponentsFree1 dep · 2 files
AlertalertblokComponentsFree2 deps · 2 files
Alert dialogalert-dialogblokComponentsFree2 deps
Aspect ratioaspect-ratioblokComponentsFree1 dep
AvataravatarblokComponentsFree1 dep
BadgebadgeblokComponentsFree2 deps
All componentsblok-componentsblokComponentsFreeno 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