Socket
Socket
Sign inDemoInstall

@chakra-ui/checkbox

Package Overview
Dependencies
Maintainers
2
Versions
535
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/checkbox

A React Checkbox component for use in forms


Version published
Weekly downloads
108K
decreased by-80.16%
Maintainers
2
Weekly downloads
 
Created

What is @chakra-ui/checkbox?

@chakra-ui/checkbox is a component library for creating accessible and customizable checkbox components in React applications. It is part of the Chakra UI library, which provides a set of accessible, reusable, and composable React components.

What are @chakra-ui/checkbox's main functionalities?

Basic Checkbox

This feature allows you to create a basic checkbox component. The Checkbox component can be used to render a simple checkbox with a label.

import { Checkbox } from '@chakra-ui/react';

function BasicCheckbox() {
  return <Checkbox>Checkbox</Checkbox>;
}

Checkbox Group

This feature allows you to create a group of checkboxes. The CheckboxGroup component helps manage the state of multiple checkboxes and can be used to render a group of checkboxes with a shared color scheme and default values.

import { Checkbox, CheckboxGroup } from '@chakra-ui/react';

function CheckboxGroupExample() {
  return (
    <CheckboxGroup colorScheme="green" defaultValue={['one', 'two']}>
      <Checkbox value="one">One</Checkbox>
      <Checkbox value="two">Two</Checkbox>
      <Checkbox value="three">Three</Checkbox>
    </CheckboxGroup>
  );
}

Indeterminate Checkbox

This feature allows you to create an indeterminate checkbox. The useCheckbox hook can be used to manage the state of the checkbox and set it to an indeterminate state.

import { Checkbox, useCheckbox } from '@chakra-ui/react';

function IndeterminateCheckbox() {
  const { getCheckboxProps, getInputProps } = useCheckbox({
    isIndeterminate: true,
  });

  return (
    <Checkbox {...getCheckboxProps()}>
      <input {...getInputProps()} />
      Indeterminate Checkbox
    </Checkbox>
  );
}

Other packages similar to @chakra-ui/checkbox

Keywords

FAQs

Package last updated on 08 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc