When to use it
Use it for several choices from a short list. Show the error on the group, not on each option.
Apple availability
Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.
Native example
Use it for several choices from a short list. Show the error on the group, not on each option.
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)
}
}Reference
The primary shared and platform-specific options exposed by LumenCheckboxGroup.
| API | Values or type | Default | Description |
|---|---|---|---|
| options / selection / orientation | choices / selected values / layout | required / required / vertical | Use it for several choices from a short list. |
Native behavior
Use it for several choices from a short list. Show the error on the group, not on each option.
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