Radio group

Exports

Import these components from @mbsw/ui.

RadioGroup
RadioGroupItem

Props

The tables list common props for each component. See the full types for supported prop combinations and inherited HTML and Radix props.

See the full types for this component's shared props.

Type reference

Show full types

Full TypeScript definitions, including prop combinations and inherited props.

import { type ComponentPropsWithoutRef } from 'react';

import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';

type DataAttributes = {
    [key: `data-${string}`]: boolean | number | string | undefined;
};

type RadioGroupPrimitiveProps = ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>;

type RadioGroupItemPrimitiveProps = ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>;

export type RadioGroupProps = Omit<RadioGroupPrimitiveProps, 'asChild' | 'color'> & DataAttributes;

export type RadioGroupItemProps = Omit<RadioGroupItemPrimitiveProps, 'asChild' | 'children' | 'color'> & DataAttributes;

export declare const RadioGroup: import("react").ForwardRefExoticComponent<Omit<Omit<RadioGroupPrimitive.RadioGroupProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "color" | "asChild"> & DataAttributes & import("react").RefAttributes<HTMLDivElement>>;

export declare const RadioGroupItem: import("react").ForwardRefExoticComponent<Omit<Omit<RadioGroupPrimitive.RadioGroupItemProps & import("react").RefAttributes<HTMLButtonElement>, "ref">, "color" | "children" | "asChild"> & DataAttributes & import("react").RefAttributes<HTMLButtonElement>>;