Use when implementing expand and collapse content sections.
中文简介正在准备中。当前显示原文说明。
Use when implementing enable single or multiple selections.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Enable single or multiple selections
A checkbox is a form control that allows users to select one or more options from a set of choices. Unlike radio buttons, checkboxes enable multiple selections and can be used independently or as part of a group. Checkboxes are essential for forms, settings panels, and any interface where users need to make multiple selections or toggle individual options on and off.
Use checkboxes when you need users to make multiple selections from a set of options. Common scenarios include:
references/pattern.md, then choose the smallest viable variation.Required ARIA attributes:
aria-describedby: Link to additional help textaria-required: For required checkbox fieldsaria-invalid: When validation failsaria-expanded: For collapsible checkbox groupsThe following table outlines the standard keyboard interactions for checkbox components.
| Key | Action |
|---|
Target Metrics:
The Problem: Using checkboxes when only one option should be selectable confuses users about the interaction model.
How to Fix It? Use radio buttons for mutually exclusive options, checkboxes only for multiple selections.
The Problem: Checkboxes without proper labels are inaccessible and confusing for users.
How to Fix It?
Always associate labels using for attribute or wrap the input in a label element.
The Problem: Related checkboxes scattered without visual grouping makes the form hard to understand.
How to Fix It? Group related options using fieldsets, containers, or visual spacing to show relationships.
For full implementation detail, examples, and testing notes, see references/pattern.md.
Pattern page: https://uxpatterns.dev/patterns/forms/checkbox
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Use when implementing expand and collapse content sections.
中文简介正在准备中。当前显示原文说明。
Use when implementing user account configuration and preferences.
中文简介正在准备中。当前显示原文说明。
Use when implementing social activity and updates stream.
中文简介正在准备中。当前显示原文说明。
Use when implementing conversational AI chat interfaces.
中文简介正在准备中。当前显示原文说明。
Use when implementing handling AI-specific errors.
中文简介正在准备中。当前显示原文说明。
Use when implementing loading states for AI operations.
中文简介正在准备中。当前显示原文说明。