Checkbox Group Description

PreviousNext

checkbox-group-description-demo

Docs
intentuipage

Preview

Loading preview…
components/docs/forms/checkbox/checkbox-group-description-demo.tsx
"use client"

import { Checkbox, CheckboxGroup, CheckboxLabel } from "@/components/ui/checkbox"
import { Description, Label } from "@/components/ui/field"

export default function CheckboxGroupDescriptionDemo() {
  return (
    <CheckboxGroup defaultValue={["delete"]}>
      <Label>User Permissions</Label>
      <Description>Select the permissions you want to grant to the user.</Description>
      <Checkbox value="read">
        <CheckboxLabel>Read</CheckboxLabel>
        <Description>Can view content but cannot make changes.</Description>
      </Checkbox>
      <Checkbox value="write">
        <CheckboxLabel>Write</CheckboxLabel>
        <Description>Can create and modify existing content.</Description>
      </Checkbox>
      <Checkbox value="delete">
        <CheckboxLabel>Delete</CheckboxLabel>
        <Description>Can permanently remove content.</Description>
      </Checkbox>
      <Checkbox value="admin">
        <CheckboxLabel>Admin</CheckboxLabel>
        <Description>Full access to all actions and settings.</Description>
      </Checkbox>
    </CheckboxGroup>
  )
}

Installation

npx shadcn@latest add @intentui/checkbox-group-description-demo

Usage

Usage varies by registry entry. Refer to the registry docs or source files below for details.