Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@equinor/fusion-react-checkbox

Package Overview
Dependencies
Maintainers
3
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/fusion-react-checkbox

component for displaying checkbox

  • 0.4.1-filter.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

#@equinor/fusion-react-checkbox Published on npm

Storybook

Fusion Web Component

Installation

npm install @equinor/fusion-react-checkbox

Example Usage

const MyComponent = () => {
  const [checked, setChecked] = useState(undefined);
  const onInput = useCallback((e) => {
      setChecked(!e.target.checked);
  }, [setChecked] );
  return (
    <div>
      <Checkbox value={checked} onInput={onInput} label="Example" />
      <p>Current State: <pre>{JSON.stringify({checked})}</pre></p>
    </div>
  );
}
<Checkbox value='value' checked/>

Properties/Attributes

NameTypeDefaultDescription
checkedbooleanfalseWhether the checkbox is checked.
indeterminatebooleanfalseWhen a checkbox is the parent of a set of child checkboxes, the indeterminate state is used on the parent to indicate that some but not all of its children are checked.
disabledbooleanfalseWhen true, the checkbox cannot be interacted with, and renders in muted colors.
valuestring''The value that will be included if the checkbox is submitted in a form.
reducedTouchTargetbooleanfalseWhen true, the checkbox remove padding for touchscreens and increase density. Note, the checkbox will no longer meet accessibility guidelines for touch.

Events

Event NameTargetDetailDescription
changefwc-checkbox{}Fired when the user modifies the checkbox checked or indeterminate states from an input device interaction. Note that, like native <input>, the change event is not fired when the checked or indeterminate properties are set from JavaScript.

Keywords

FAQs

Package last updated on 27 Oct 2021

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