Check out BugBytes overview of labb

Label

<c-lb.label /> Markdown

Label component for Django: add consistent, accessible labels to form fields. Built with django-cotton, Tailwind CSS, and daisyUI 5.

Label wraps daisyUI's label styling in a cotton component that pairs cleanly with inputs, selects, and textareas. The floating variant keeps the label visible above the field once a value is entered.

Basic Label

Email

We will never share your email

<c-lb.fieldset legend="Email">
  <c-lb.input type="email" placeholder="[email protected]" />
  <c-lb.label>We will never share your email</c-lb.label>
</c-lb.fieldset>

Floating Label

<c-lb.label floating>
  <span>Your Email</span>
  <c-lb.input type="email" placeholder="[email protected]" />
</c-lb.label>

API Reference

c-lb.label

Property Type Default Required Description
class string - No Additional CSS classes to apply
as
p span label div
p No HTML element to render as
floating boolean False No Render as a floating label (wraps input with floating-label class)
Slot Name Description
default Label text content