Getting StartedComponentsDesign TokensThemingTheme SynthesizerFrameworksAccessibilityUtilitiesServer RenderingBrowser SupportContributingChangelog App ShellAspect GridAuth ShellCenterClusterContainerDashboard GridDockFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbar Anchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkSpeed DialStepper NavTabsTop BarTree View AccordionAspect RatioAvatarAvatar GroupCalloutCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSeparatorSkeletonSpinnerStackVideoVirtual List Activity HeatmapAnimated NumberBadgeChartClockComparisonCountdown TimerData GridData TableDescription ListDiffEvent CalendarGaugeJSON TreeKanbanKey ValueLevel MeterListMeterSparklineStatStepperTableTagTimelineUptimeValue CardWaveform BlockquoteCode BlockGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriter ButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputOTP InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree Select AlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuGuided TourHover CardInline MessageLoading OverlayModalNotification PanelPopoverProgressProgress ToastSheetSnackbarSpotlightToastTooltip
ARC UI ARC Radiant Components
v3.2 Docs Components Tokens Synthesizer
Getting StartedFrameworksServer Rendering Design TokensThemingTheme SynthesizerTypographyUtilities All ComponentsAccessibilityBrowser SupportChangelogContributingStats App ShellAspect GridAuth ShellCenterClusterContainerDashboard GridDockFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbar Anchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkSpeed DialStepper NavTabsTop BarTree View AccordionAspect RatioAvatarAvatar GroupCalloutCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSeparatorSkeletonSpinnerStackVideoVirtual List Activity HeatmapAnimated NumberBadgeChartClockComparisonCountdown TimerData GridData TableDescription ListDiffEvent CalendarGaugeJSON TreeKanbanKey ValueLevel MeterListMeterSparklineStatStepperTableTagTimelineUptimeValue CardWaveform BlockquoteCode BlockGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriter ButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputOTP InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree Select AlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuGuided TourHover CardInline MessageLoading OverlayModalNotification PanelPopoverProgressProgress ToastSheetSnackbarSpotlightToastTooltip

Fieldset

Grouped form section with legend, description, error message, and optional card variant. Wraps related inputs with native fieldset semantics.

Components Fieldset
input static
<arc-fieldset>

Overview

Fieldset wraps a group of related form controls inside a native `<fieldset>` element with a styled legend, optional description text, and error messaging. It provides the semantic grouping that screen readers use to announce related fields as a unit. Two variants control the visual treatment: the default variant renders a bordered container with rounded corners, while the card variant adds a surface background and subtle shadow for elevated form sections. The `error` prop renders a red alert message below the content area, useful for group-level validation like "At least one option must be selected." An `actions` slot in the legend area lets you place buttons or links (like "Select all" or "Reset") inline with the group heading. The `disabled` prop cascades to all child controls via the native fieldset disabled behavior, dimming the entire group at once.

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

  • Do not nest fieldsets more than one level deep — it creates confusing screen reader announcements
  • Do not use Fieldset for visual-only grouping — use a `div` or `arc-card` instead
  • Do not 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';

export default function Example() {
  return (
    <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: `
    <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-fieldset>
  `,
})
export class ContactForm {}
import { Fieldset, Label, Input } from '@arclux/arc-ui-solid';

export default function Example() {
  return (
    <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';

export default function Example() {
  return (
    <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

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