Check out BugBytes overview of labb

Fieldset

<c-lb.fieldset /> Markdown

Fieldset component for Django: group related form fields with labels and legends. Built with django-cotton, Tailwind CSS, and daisyUI 5.

Fieldset wraps a group of form controls in a daisyUI-styled <fieldset> with a <legend>. Use it to visually cluster related inputs like address fields or date ranges.

Basic Fieldset

Page title

You can edit page title later on from settings

<c-lb.fieldset legend="Page title">
  <c-lb.input type="text" placeholder="My awesome page" />
  <c-lb.label>You can edit page title later on from settings</c-lb.label>
</c-lb.fieldset>

Styled Fieldset

Page title

You can edit page title later on from settings

<c-lb.fieldset legend="Page title" class="bg-base-200 border-base-300 rounded-box w-xs border p-4">
  <c-lb.input type="text" placeholder="My awesome page" />
  <c-lb.label>You can edit page title later on from settings</c-lb.label>
</c-lb.fieldset>

Custom Legend Slot

Required

Page title

You can edit page title later on from settings

<c-lb.fieldset class="bg-base-200 border-base-300 rounded-box w-xs border p-4">
  <c-slot name="legendSlot">
    <c-lb.fieldset.legend>
      <c-lb.badge size="xs" variant="error">Required</c-lb.badge>
    </c-lb.fieldset.legend>
  </c-slot>
  <c-lb.label>Page title</c-lb.label>
  <c-lb.input type="text" placeholder="My awesome page" />
  <c-lb.label>You can edit page title later on from settings</c-lb.label>
</c-lb.fieldset>

API Reference

c-lb.fieldset

Property Type Default Required Description
class string - No Additional CSS classes to apply
legend string - No Legend text for the fieldset
Slot Name Description
default Form elements inside the fieldset
legendSlot Custom legend content (overrides legend attribute)

c-lb.fieldset.legend

Property Type Default Required Description
class string - No Additional CSS classes to apply
Slot Name Description
default Legend text content