Checkbox & Radio
A checkbox with a quick pop-in checkmark and a radio group with an animated selection ring, both with matching haptics.
Prerequisites
Both controls are plain Reanimated and haptics, no icon set beyond the checkmark already bundled with the library's icons component.
npx expo install react-native-reanimated expo-haptics react-native-css
Install
npx @rslab/cli add checkbox
Usage
import { Checkbox } from '@/components/ui/Checkbox';
const [agreed, setAgreed] = useState(false);
<Checkbox checked={agreed} onChange={setAgreed} label="I agree to the terms" />;import { RadioGroup } from '@/components/ui/Radio';
const [plan, setPlan] = useState('solo');
<RadioGroup
value={plan}
onChange={setPlan}
options={[
{ label: 'Solo', value: 'solo' },
{ label: 'Team', value: 'team' },
]}
/>;Props
Checkbox
PropTypeDefault
checkedboolean-onChange(checked: boolean) => void-label?string-Optional label rendered next to the box.
disabled?booleanfalseFades the row and blocks toggling.
haptic?booleantrueLight haptic tick on toggle. Set false to mute it.
className?string-Extend or override the outer row.
RadioGroup
PropTypeDefault
valueT-onChange(value: T) => void-options{ label: string; value: T }[]-Generic over the value’s string literal type, so unions narrow correctly.
disabled?booleanfalseFades the group and blocks selection.
haptic?booleantrueSelection tick on picking a new option.
className?string-Extend or override the outer wrapper.
See exactly how this works with an RSLAB subscription.
Get Pro