Fieldset

A group of related form fields with a common label.

Installation

Install the component package, shared coss-svelte theme, and Bits UI peer.

npm install coss-svelte @coss-svelte/theme bits-ui

Usage

Import the Svelte component exports directly from the package.

import { Fieldset, FieldsetLegend } from "coss-svelte";

Anatomy

  • Fieldset
  • FieldsetLegend

API Reference

Fieldset

A group of related form fields with a common label.

PropTypeDefaultDescription
legendstring""Legend text rendered by the fieldset fallback layout.
descriptionstring""Supporting text rendered by the component's built-in fallback layout.
children : Snippet<[]>

Inherits from Svelte <fieldset> attributes.

FieldsetLegend

Names the grouped controls inside a fieldset.

children : Snippet<[]>

Inherits from Svelte component attributes.

Implementation Details

Status
Stable
Foundation
native
Category
Forms & Validation
Particles
1