Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

@equinor/fusion-react-checkbox

Package Overview
Dependencies
3
Maintainers
4
Versions
36
Issues
File Explorer

Advanced tools

@equinor/fusion-react-checkbox

component for displaying checkbox

    0.5.15latest
    Github

Version published
Maintainers
4
Weekly downloads
1,022
increased by3.44%

Weekly downloads

Changelog

Source

@equinor/fusion-react-checkbox@0.5.15

0.5.15 (2023-02-14)

Bug Fixes

  • exporting types as type in packages (f298ce9)

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 installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • 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