Components
GroupBox
Visually group related content with an optional label.
Example
Requires React 18.2+ or 19 and shared styles. See setup.
Default
Loading preview…
Code
'use client';
import { VStack, Text } from '@swiftuijs/ui';
import { GroupBox } from '@swiftuijs/ui';
export default function Example() {
return (<GroupBox label="Settings">{(<VStack spacing={10} style={{ padding: '15px' }}>
<Text>Setting 1</Text>
<Text>Setting 2</Text>
</VStack>)}</GroupBox>);
}Usage and limitations
labelis optional; a supplied label names arole="group"region.- Use a descriptive label and consistent spacing/styling. Children retain their own semantic structure and interaction requirements.
More examples
Without Label
With Form Controls
Multiple GroupBoxes
With Buttons
API reference
| Prop | Type | Required | Description |
|---|---|---|---|
label | string | No | Optional label for the group box. |
Inherits additional props from IBaseComponent.