Componentform0.6 KB gzipZero dependencies
Radio Tile
Radio tile with icon, description and sliding dot.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add radio-tileOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { RadioTile } from "@/components/ui/radio-tile"; <RadioTile />Source code
radio-tile.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxradio-tile.tsx58 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface RadioTileProps extends React.HTMLAttributes<HTMLLabelElement> { title: string; description?: string; icon?: React.ReactNode; value: string; checked?: boolean; onCheckedChange?: (value: string) => void; name?: string;} /** Radio tile card: icon + title + description + radio indicator. */export function RadioTile({ title, description, icon, value, checked, onCheckedChange, name = "radio-tile", className, ...props }: RadioTileProps) { return (Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { RadioTile } from "@/components/ui/radio-tile"; <RadioTile />| Prop | Type | Description |
|---|---|---|
| title | string | Primary heading or title text. |
| description | string | Descriptive helper or subtitle text. |
| icon | React.ReactNode | Custom icon node rendered alongside the label. |
| value | string | Controlled value. |
| checked | boolean | Controlled checked state. |
| onCheckedChange | (value: string) => void | Callback invoked on checked change. |
| name | string | Form field name submitted during form serialization. (Default: "radio-tile") |