Skip to main content
Version: Next

Radio Button

The RadioButton is a component that displays a circular button with a border and an inner circle that can be toggled on and off.

Import

import { Slider } from '@tra-tech/react-native-kitra';

Usage

import { RadioButton } from '@tra-tech/react-native-kitra';
import { View, StyleSheet } from 'react-native';

const App = () => (
<View style={style.container}>
<RadioButton style={{ alignSelf: 'center' }} onChange={x => console.log(x)} />
</View>
);

const style = StyleSheet.create({
container: { flex: 1, justifyContent: 'center' },
});

export default App;

Props

Prop NameTypeRequiredDescription
onChange(event: boolean) => voidYesA function that is called when the radio button is pressed. The current value of the radio button is passed as an argument to the function.
styleStyleProp<ViewStyle>NoAdditional styles to apply to the radio button container.
themeUIThemeNoThe theme to use for the component.