Skip to content
ARC UI ARC Reactive Components
Docs Components Tokens Synthesizer
v2.1.0
Getting Started Frameworks Design Tokens Theming Theme Synthesizer Accessibility Browser Support Changelog Contributing All Components App ShellAspect GridAuth ShellCenterClusterContainerDashboard GridDockFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbar Anchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkSpeed DialStepper NavTabsTop BarTree View AccordionAspect RatioAvatarAvatar GroupCalloutCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageInfinite ScrollMarqueeScroll AreaSeparatorSkeletonSpinnerStackVirtual List Animated NumberBadgeComparisonCountdown TimerData TableDescription ListDiffKey ValueListMeterSparklineStatStepperTableTagTimelineValue Card BlockquoteCode BlockGradient TextHighlightKbdMarkdownNumber FormatProseTextTime AgoTruncateTypewriter ButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerFieldsetFile UploadFormHotkeyIcon ButtonInputInput GroupLabelMulti SelectNumber InputOTP InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSliderSortable ListSwitch GroupTextareaTheme ToggleTime PickerToggle AlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuDialogDropdown MenuGuided TourHover CardInline MessageLoading OverlayModalNotification PanelPopoverProgressProgress ToastSheetSnackbarSpotlightToastTooltip
Components Fieldset
input static
<arc-fieldset>

Overview

Guidelines

When to use

  • Group related inputs that share a common label — e.g., "Shipping Address" fields
  • Use the card variant for visually distinct form sections in settings pages
  • Use the error prop for group-level validation like "Select at least one option"
  • Provide a legend for every fieldset — it is the accessible group label

When not to use

  • Nest fieldsets more than one level deep — it creates confusing screen reader announcements
  • Use Fieldset for visual-only grouping — use a `div` or `arc-card` instead
  • Put field-level errors in the fieldset error slot — attach those to individual inputs

Features

  • Native `<fieldset>` and `<legend>` elements for proper form semantics
  • Two variants: default (bordered) and card (elevated surface)
  • Legend text via prop or slot for flexible heading content
  • Description text for group-level helper context
  • Error message with `role="alert"` for group validation feedback
  • Actions slot for inline legend controls (Select all, Reset, etc.)
  • Disabled state cascades to all child controls via native fieldset behavior
  • Exposed CSS parts: fieldset, legend, description, content, error

Preview

Usage

<arc-fieldset legend="Contact info" description="We'll use this to reach you.">
  <arc-label for="email" required>Email</arc-label>
  <arc-input id="email" type="email" placeholder="you@example.com"></arc-input>

  <arc-label for="phone">Phone</arc-label>
  <arc-input id="phone" type="tel" placeholder="(555) 123-4567"></arc-input>
</arc-fieldset>

<!-- Card variant with error -->
<arc-fieldset legend="Preferences" variant="card" error="Please select at least one option.">
  <arc-checkbox label="Option A"></arc-checkbox>
  <arc-checkbox label="Option B"></arc-checkbox>
</arc-fieldset>
import { Fieldset, Label, Input, Checkbox } from '@arclux/arc-ui-react';

<Fieldset legend="Contact info" description="We'll use this to reach you.">
  <Label htmlFor="email" required>Email</Label>
  <Input id="email" type="email" placeholder="you@example.com" />
  <Label htmlFor="phone">Phone</Label>
  <Input id="phone" type="tel" placeholder="(555) 123-4567" />
</Fieldset>
<script setup>
import { Fieldset, Label, Input } from '@arclux/arc-ui-vue';
</script>

<template>
  <Fieldset legend="Contact info" description="We'll use this to reach you.">
    <Label for="email" required>Email</Label>
    <Input id="email" type="email" placeholder="you@example.com" />
  </Fieldset>
</template>
<script>
  import { Fieldset, Label, Input } from '@arclux/arc-ui-svelte';
</script>

<Fieldset legend="Contact info" description="We'll use this to reach you.">
  <Label for="email" required>Email</Label>
  <Input id="email" type="email" placeholder="you@example.com" />
</Fieldset>
import { Component } from '@angular/core';
import { Fieldset, Label, Input } from '@arclux/arc-ui-angular';

@Component({
  imports: [Fieldset, Label, Input],
  template: `
    <Fieldset legend="Contact info" description="We'll use this to reach you.">
      <Label for="email" required>Email</Label>
      <Input id="email" type="email" placeholder="you@example.com" />
    </Fieldset>
  `,
})
export class ContactForm {}
import { Fieldset, Label, Input } from '@arclux/arc-ui-solid';

<Fieldset legend="Contact info" description="We'll use this to reach you.">
  <Label for="email" required>Email</Label>
  <Input id="email" type="email" placeholder="you@example.com" />
</Fieldset>
import { Fieldset, Label, Input } from '@arclux/arc-ui-preact';

<Fieldset legend="Contact info" description="We'll use this to reach you.">
  <Label for="email" required>Email</Label>
  <Input id="email" type="email" placeholder="you@example.com" />
</Fieldset>
<!-- Use native <fieldset> and <legend> -->
<fieldset class="arc-fieldset" style="border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 16px 24px 24px;">
  <legend style="font-weight: 600; color: var(--text-primary); padding: 0 4px;">Contact info</legend>
  <p style="font-size: 14px; color: var(--text-muted);">We'll use this to reach you.</p>
  <!-- inputs here -->
</fieldset>
<fieldset style="border: 1px solid rgb(42, 42, 52); border-radius: 10px; padding: 16px 24px 24px; margin: 0;">
  <legend style="font-weight: 600; color: rgb(224, 224, 232); padding: 0 4px;">Contact info</legend>
  <!-- inputs here -->
</fieldset>

API

Prop Type Default Description
legend string '' Text displayed in the `<legend>` element. Also available via the `legend` slot for rich content.
description string '' Helper text displayed below the legend.
disabled boolean false Disables all child controls and dims the fieldset.
error string '' Error message displayed below the content with `role="alert"`.
variant 'default' | 'card' 'default' Visual style. Card adds a surface background and shadow.

See Also