Race Controlstable
Lap Counter
A broadcast lap counter that rolls the lap as the race runs and calls the last lap the final lap.
Preview
Lap 12 of 57
Playground
12
The lap the race is on.
57
Laps in the race. The counter reads FINAL LAP once the lap reaches it.
The word beside the numbers.
Counter size.
Installation
Package manager
Register the boxbox namespace once per project:
bunx shadcn@latest registry add @boxbox=https://react-boxbox.vercel.app/r/{name}.jsonThen add the component:
bunx shadcn@latest add @boxbox/lap-counter
Props
| Name | Type | Default | Description |
|---|---|---|---|
| lap | number | 12 | The lap the race is on. |
| totalLaps | number | 57 | Laps in the race. The counter reads FINAL LAP once the lap reaches it. |
| label | string | LAP | The word beside the numbers. |
| size | 'sm' | 'md' | 'lg' | md | Counter size. |
Dependencies
- motion