Checkbox

Description

The Checkbox component is a customizable checkbox built with React and Tailwind CSS, utilizingclass-variance-authority for styling variants. It provides different styles (variant) and sizes (size) to fit various UI needs. The component leverages the peer utility in Tailwind CSS to enhance styling co

Usage


import { Checkbox } from "mogora-ui";

export default function ChecboxDemo() {
  return (
    <div>
      <Checkbox variant={"primary"} name="check" />
    </div>
  )
}
  
Variants

API Reference

Checkbox

A styled checkbox component supporting variants and sizes.

PropTypeDescription
namestringThe unique name/id for the checkbox input.
variant"accent" | "danger" | "info" | "primary" | "success" | "warning"Sets the visual style of the checkbox. Default is default.
size"sm" | "md" | "lg"Defines the checkbox size. Default is md.
classNamestringAdditional styling classes.

The Checkbox component provides an accessible and flexible way to include styled checkboxes in your React application.