Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Apple docs
FormsApple

Checkbox group

Choose any number of related options under one label.

Public APILumenCheckboxGroupApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple Vision · visionOS 1+

Native example

Use Checkbox group

Use it for several choices from a short list. Show the error on the group, not on each option.

Checkbox group rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulatorView dark appearance
swift
import LumenUI
import SwiftUI

struct CheckboxGroupExample: View {
    @State private var channels: Set<String> = ["email"]

    var body: some View {
        LumenCheckboxGroup("Release channels", selection: $channels, options: [
            .init("Email", value: "email", description: "A concise release summary."),
            .init("Community", value: "community", description: "Discussion and examples."),
            .init("Archived channel", value: "archived", isDisabled: true)
        ], description: "Choose how you hear about changes.",
           errorMessage: channels.isEmpty ? "Choose at least one channel." : nil,
           required: true)
    }
}
Apple
A required group of release channels that shows its error when nothing is selected.

Reference

Public API

The primary shared and platform-specific options exposed by LumenCheckboxGroup.

APIValues or typeDefaultDescription
options / selection / orientationchoices / selected values / layoutrequired / required / verticalUse it for several choices from a short list.

Native behavior

Design and accessibility

When to use it

Use it for several choices from a short list. Show the error on the group, not on each option.

Accessibility

The group has a visible label and error hint; each checkbox also reads the group name, requirement, and error alongside its own description.

Shared component

Available on other platforms

React NativeAndroid / Compose Web
Apple docsSwiftUI package