Knit UI
GitHub

Playground

Loading playground…

false
Playground
<Fieldset
  legend="Personal details"
  variant="default"
  disabled={false}
>
  <Text>Form controls go here</Text>
</Fieldset>

Examples

Variants

Every visual variant side by side, each with a legend and placeholder content.

Loading example…

VariantsSourceStorybook

Shadows

Each elevation level from the shared shadow ladder.

Loading example…

ShadowsSourceStorybook

With Legend

Fieldset with a legend label identifying the group of controls.

Loading example…

With LegendSourceStorybook

Without Legend

Fieldset with no legend — the border and padding remain, but no label is shown.

Loading example…

Without LegendSourceStorybook

Disabled

Disabled state — all controls inside are dimmed and not interactive.

Loading example…

DisabledSourceStorybook

Filled

The filled variant uses a subtle background tint to distinguish the group.

Loading example…

FilledSourceStorybook

Theme

Theme changes the tint used by the filled variant.

Loading example…

ThemeSourceStorybook

Unstyled

The unstyled variant strips all chrome — no border, no padding, no radius.

Loading example…

UnstyledSourceStorybook

Nested

Nested fieldsets — group sub-sections of a larger form.

Loading example…

NestedSourceStorybook

Styles

Per-slot styles targets individual parts — here the root and legend.

Loading example…

StylesSourceStorybook

Props

PropTypeDefaultDescription
disabled systemboolean | undefinedfalseDims the fieldset and blocks interaction with the controls inside it.
legendReactNodePersonal detailsLabel rendered as the fieldset legend.
radius systemstring | number | undefined
unset · xxs · xs · sm · md · lg · xl · xxl
Border radius applied to the fieldset frame.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
unset · xs · sm · md · lg · xl
Elevation — drop shadow from the shared ladder.
styles systemSlotStyles<FieldsetStyles> | undefinedPer-slot style sugar — props spread onto the matching styled part.
theme systemThemeName | null | undefined
unset · blue · red · green · yellow · pink · gray
Accent theme used by tinted surfaces.
variant system"unstyled" | "default" | "filled" | undefined
default · filled · unstyled
defaultVisual style — how the fieldset border and background are rendered.

Style slots

Every part of Fieldset can be styled through the styles prop. Explicit props on the component always win over slot styles.

SlotUsage
legendstyles={{ legend: { … } }}
rootstyles={{ root: { … } }}
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiElement> | undefined

Plus 499 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.