Documentation
Radio Group

Radio Group

Example

import { RadioGroup } from '@i4o/catalystui'
 
export default () => {
	return (
		<RadioGroup
			defaultValue='1'
			name='radio'
			options={[
				{
					label: <p className='text-gray-900'>Option 1</p>,
					value: '1',
				},
				{
					label: <p className='text-gray-900'>Option 2</p>,
					value: '2',
				},
				{
					label: <p className='text-gray-900'>Option 3</p>,
					value: '3',
				},
			]}
		/>
	)
}

Props

NameTypeDefaultDescription
defaultValuestring''The default value of the radio group.
disabledbooleanfalseWhether the radio group is disabled.
namestring''The name of the radio group.
onChange(value: string) => voidundefinedThe callback function that is triggered when the value of the radio group changes.
optionsArray<{ id: string, label: string | ReactNode, value: string }>[]The options of the radio group.