UI Launch Docs

Checkbox

Checkbox component of the UILaunch design system, how to import it and its usage.

☑️ Checkbox

The Checkbox component allows users to select one or more options from a set. It provides a simple way to represent boolean values (checked or unchecked) and includes a built-in animation when toggling between states.

Use it when you need to represent binary options like accepting terms and conditions, toggling settings, or selecting multiple items from a list.

checkbox


📦 Import

import Checkbox from '@madefordevs1999/ui-launch-native/system/atoms/Checkbox';

🧩 Usage

import Checkbox from '@madefordevs1999/ui-launch-native/system/atoms/Checkbox';
import { View } from 'react-native';
import { useState } from 'react';

const App = () => {
  const [checked, setChecked] = useState(true);

  return (
    <View style={{ padding: 20 }}>
      <Checkbox
        value={checked}
        onValueChange={setChecked}
        disabled={false}
      />
    </View>
  );
};

export default App;

Results

checkbox-example

🧪 Composition

If you want to add a label or descripion text next to the checkbox, you can use the CheckboxWithLabel component, which is a wrapper around the Checkbox component that adds a label next to the checkbox.

📜 Props

Prop NameTypeDefaultDescription
disabledbooleanfalseDisables the checkbox when true, preventing any interaction.
valuebooleanfalseCurrent checked state of the checkbox.
initialValuebooleanfalseInitial state before the user interaction begins.
onValueChange(value: boolean) => voidundefinedCallback function triggered when the checkbox state changes.
wrapperPropsPressablePropsundefinedAdditional props passed to the outer Pressable container.
childrenReact.ReactNodeundefinedOptional label or content displayed next to the checkbox.