Components
ControlGroup
ControlGroup clusters related actions under a shared label. The component keeps SwiftUI's grouped-control mental model while using standard web grouping semantics.
Example
Requires React 18.2+ or 19 and shared styles. See setup.
Default
Loading preview…
Code
'use client';
import { Button } from '@swiftuijs/ui';
import { ControlGroup } from '@swiftuijs/ui';
export default function Example() {
return ((<ControlGroup label="Formatting">
<Button>Bold</Button>
<Button>Italic</Button>
<Button>Underline</Button>
</ControlGroup>));
}Usage and limitations
- Use
labelto provide the group's accessible name. - Use
orientation="vertical"when actions should stack instead of sit inline.
API reference
| Prop | Type | Required | Description |
|---|---|---|---|
label | ReactNode | No | Optional label shown above or alongside the controls. |
orientation | 'horizontal' | 'vertical' | No | The axis used to arrange the controls. Default: 'horizontal' |
Inherits additional props from IBaseComponent.