Skip to main content

Starwind UI v1.5.0 is now available!

Checkbox

Installation

Usage

variant

size

disabled

API Reference

PropTypeDefault
idstringRequired
labelstring-
variant"default" | "primary" | "secondary" | "info" | "success" | "warning" | "error""default"
size"sm" | "md" | "lg""md"

The component also accepts all standard HTML attributes for the <input type="checkbox"> element.

Changelog

v1.2.0

  • No longer require an “id” prop
  • Adjust component to use type VariantProps from tailwind-variants. This provides greater type safety and cleans up component frontmatter.

v1.1.0

  • tailwind-variants now implemented. This uses tailwind-merge under the hood to merge Tailwind classes without style conflicts, allowing you to override any existing classes using the “class” prop.