Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
React Native docs
FormsReact Native

Checkbox group

Choose any number of related options under one label.

Public APILumenCheckboxGroupReact Native

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 Expo web renderer Lumen playground

Captured exampleExpo web renderer

Open interactive preview
Open the Checkbox group demo
tsx
import { LumenCheckboxGroup } from '@santi020k/lumen-react-native'
import { useState } from 'react'

export function NotificationChannels() {
  const [channels, setChannels] = useState<string[]>(['email'])

  return (
    <LumenCheckboxGroup
      label="Notifications"
      description="Choose where to receive updates."
      required
      value={channels}
      onValueChange={setChannels}
      options={[
        { value: 'email', label: 'Email', description: 'A daily summary' },
        { value: 'push', label: 'Push', description: 'Time-sensitive updates' },
        { value: 'sms', label: 'SMS', disabled: true }
      ]}
      {...(channels.length === 0 ? { errorMessage: 'Choose at least one channel.' } : {})}
    />
  )
}
React Native
A required notification-channel group with descriptions, a disabled option, and a host-owned validation message when nothing is selected.

Reference

Public API

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

APIValues or typeDefaultDescription
options / value / 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

Apple / SwiftUIAndroid / Compose Web
React Native docsNative primitives