Components
Loading preview...
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.
npx shadcn@latest add https://21st.dev/r/Edil-ozi/custom-checkbox"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 }