{"repo":"react-component/checkbox","free":true,"listed":false,"github":"https://github.com/react-component/checkbox","clone":"git clone https://github.com/react-component/checkbox.git","description":"☑️ A small, accessible checkbox primitive for React.","language":"TypeScript","stars":132,"topics":["ant-design","antd","javascript","react","react-component"],"license":"MIT","category":"ui-components","readme_excerpt":"@rc-component/checkbox Part of the Ant Design ecosystem. ☑️ A small, accessible checkbox primitive for React. English 简体中文 Highlights - Works as a controlled or uncontrolled checkbox. - Exposes an imperative ref for focus, blur, and DOM access. - Keeps native input attributes available while normalizing the change event. - Ships compiled JavaScript, TypeScript definitions, and a standalone CSS asset. Install Usage Examples Run the local dumi site: Then open http://localhost:8000 . API Checkbox Property Description Type Default -------------- ------------------------------------------ -------------------------------------- ------------- checked Whether the checkbox is checked boolean - className Additional class name string - defaultChecked Whether the checkbox is checked by default boolean false disabled Whether the checkbox is disabled boolean false name Same as native checkbox input name string - prefixCls Component class name prefix string rc-checkbox style Inline style for the wrapper React.CSSProperties - type Native input type string checkbox value Same as native checkbox input value string \\ number \\ readonly string[] - onChange Callback when checked state changes (event: CheckboxChangeEvent) = void - Other native input attributes are also supported. Ref Property Description Type ------------- ------------------------------ ---------------------------------- blur Remove focus from the checkbox () = void focus Focus the checkbox (options?: FocusOptions) = void input Nat","default_branch":null,"files":null,"tree":[],"storefront":"/r/react-component","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/react-component/checkbox/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}