Skip to main content

Starwind UI v3.0 is now available! Migration guide

Installation

Usage

---
import { Label } from "@/components/starwind/label";
import { Input } from "@/components/starwind/input";
---
<div class="space-y-2">
<Label for="demo-input">Email</Label>
<Input id="demo-input" type="email" placeholder="Enter your email" />
</div>

Sizes

Disabled State

API Reference

Styled Component API

These props are added or materially changed by the installed styled component. Standard HTML attributes remain available through the inherited interfaces noted below. Expand a prop to see named type definitions and framework-specific imports. Follow the Primitive and Runtime links for lower-level behavior props.

Label

Inherits label attributes.

Contains the following additional props:

Prop Type Default Toggle details
size "sm" | "md" | "lg" "md"
Description
Selects the component's visual size.
Classification
Styled variant

Changelog

View version history v1.3.1 5 releases

v1.3.1

  • In Astro, an attribute that you set on Label now wins over the component’s own default for the same attribute, such as role or aria-label.

v1.3.0

  • The component is now available for React as well as Astro. Its props and styles stay the same.

v1.2.2

  • The Tailwind variants now live in their own variants.ts file in the component folder.

v1.2.0

  • Add data-slot attribute to enable global styling updates

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.