bit Bheadless

Fieldset

Group a set of form controls together with a fully accessible but much easier-to-style version of the native fieldset and legend elements.

Implementation: CSS Tailwind

Basic example

Use BitBhFieldset and BitBhLegend to group a set of form controls together with a title. The fieldset uses the native <fieldset> element while the legend renders as a <div> (since native <legend> is notoriously hard to style).

Shipping details

Where should we deliver your order?

Disabling a fieldset

Set Disabled="true" on the BitBhFieldset to disable every form control inside. The fieldset, legend, and all nested fields receive data-disabled for CSS hooks, and the native disabled attribute on the fieldset prevents interaction.

Account (locked)

Verify your email to edit these fields.

Toggling at runtime

Bind Disabled to a state value to enable or disable the entire group dynamically. Every nested input reflects the change through both the native disabled attribute and data-disabled.

Editing
Profile

Shown publicly on your profile page.

An unhandled error has occurred. Reload 🗙