Task Checklist
React Native (Expo)
A React Native to-do list with a progress bar, where ticking a task draws a strike-through line across its text.
A to-do list with a progress bar above it. Ticking a task fills its box, greys its text and draws a line through it from left to right, and the bar grows to the share of tasks finished. Each task is a checkbox, and the progress is read out as "2 of 4 done". Built for React Native and Expo with react-native only; this page previews it in the browser through react-native-web.
Installation
CLI
npx @modus-ui/cli add task-checklistManual
- Copy the code from the component tab.
- Create a file at
components/ui/task-checklist.tsx. - Paste the code.
It needs no packages beyond react-native, which your Expo or React Native app already has.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | ChecklistItem[] | - | The tasks, each with an id and a label. |
value | string[] | - | The ids of the finished tasks. |
onChange | (value: string[]) => void | - | Called with the new list of finished ids. |
colors | Partial<TaskChecklistColors> | - | Overrides accent, text, done, track and border. |
style | StyleProp<ViewStyle> | - | Style for the whole list. |
Comments