UNPKG

@neynar/ui

Version:

React UI component library built on shadcn/ui and Tailwind CSS

40 lines (30 loc) 1.38 kB
# RadioGroupItem **Type**: component Individual radio button item for use within RadioGroup RadioGroupItem represents a single selectable option in a radio group. Must be used within a RadioGroup component and should be paired with a Label for proper accessibility. The component automatically handles visual states including checked, unchecked, focused, and disabled. It includes a built-in indicator that displays when the item is selected. Each radio item requires a unique value prop that identifies it within the group. The component forwards all standard button attributes and supports custom styling via className. ## JSX Usage ```jsx import { RadioGroupItem } from '@neynar/ui'; <RadioGroupItem value="value" disabled={true} required={true} asChild={true} /> ``` ## Component Props ### value - **Type**: `string` - **Required**: Yes - **Description**: The value given as data when submitted with a name (required) ### disabled - **Type**: `boolean` - **Required**: No - **Description**: When true, prevents the user from interacting with the item ### required - **Type**: `boolean` - **Required**: No - **Description**: When true, indicates that the user must check the item before the owning form can be submitted ### asChild - **Type**: `boolean` - **Required**: No - **Description**: Change the default rendered element for the one passed as a child