foontofoonto

Component

Animated Checkbox

A checkbox that fills and pops a checkmark when toggled.

How to use

Minimal, copy-pasteable code.

Agree.tsx
import { useState } from "react";
import { AnimatedCheckbox } from "react-native-foonto";

export function Agree() {
  const [checked, setChecked] = useState(false);

  return (
    <AnimatedCheckbox
      checked={checked}
      onChange={setChecked}
      color="#6d28d9"
      size={28}
    />
  );
}

Props

PropTypeDefaultDescription
checkedreqbooleanWhether the box is checked.
onChange(checked: boolean) => voidCalled with the next checked value on press.
sizenumber28Edge length of the box in px.
colorstring'#6d28d9'Fill + border color when checked.
borderColorstring'#c4c4cc'Border color when unchecked.
checkColorstring'#ffffff'Color of the checkmark.
durationnumber180Animation duration in ms.
disabledbooleanfalseDisable interaction and dim the box.
styleFoontoStyleStyle for the pressable.

AI prompt

Install the library, then paste this into your AI coding agent to wire it up.

AI prompt
Add an animated checkbox using the `react-native-foonto` library.

1. Make sure `react-native-foonto` and `react-native-reanimated` are installed.
2. Import `AnimatedCheckbox` from `react-native-foonto`.
3. Hold the checked state with `useState` and pass `checked` + `onChange`.
4. Set `color` to your brand color and `size` to fit the row.
5. For a to-do list, render one per row and strike through the label when checked.