The CustomCheckbox component is a versatile and customizable checkbox element designed for React applications. It supports multiple styles, including default, gradient shadow, transformer, and animated variants. Each variant offers unique visual effects, such as gradient shadows or animations, to enhance user interaction. The component utilizes forwardRef for better integration with React's ref system and is styled using Tailwind CSS classes. This component is ideal for creating interactive and visually appealing checkbox elements in modern web applications.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Custom Checkbox to your project and fits it to your theme.
Code
How Custom Checkbox is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client"
import { CustomCheckbox, GradientCheckbox, TransformerCheckbox, AnimatedCheckbox } from "@/components/ui/custom-checkbox"
function DefaultCheckbox() {
return (
<div className="flex flex-col items-center gap-4 p-1 text-center xl:gap-8">
<CustomCheckbox />
<span>Just a normal one</span>
</div>
)
}
function GradientCheckboxDemo() {
return (
<div className="flex flex-col items-center gap-4 p-1 text-center xl:gap-8">
<GradientCheckbox />
<span>With gradient shadow</span>
</div>
)
}
function TransformerCheckboxDemo() {
return (
<div className="flex flex-col items-center gap-4 p-1 text-center xl:gap-8">
<TransformerCheckbox />
<span>Transformer</span>
</div>
)
}
function AnimatedCheckboxDemo() {
return (
<div className="flex flex-col items-center gap-4 p-1 text-center xl:gap-8">
<AnimatedCheckbox />
<span>With animation</span>
</div>
)
}
export { DefaultCheckbox, GradientCheckboxDemo, TransformerCheckboxDemo, AnimatedCheckboxDemo }














