Socket
Socket
Sign inDemoInstall

@equinor/fusion-react-checkbox

Package Overview
Dependencies
28
Maintainers
4
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @equinor/fusion-react-checkbox

component for displaying checkbox


Version published
Weekly downloads
586
decreased by-48.05%
Maintainers
4
Created
Weekly downloads
 

Readme

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

Last updated on 14 Feb 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc