0.4.1-filter.0 • Published 4 years ago
@equinor/fusion-react-checkbox v0.4.1-filter.0
#@equinor/fusion-react-checkbox
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
Name | Type | Default | Description |
---|---|---|---|
checked | boolean | false | Whether the checkbox is checked. |
indeterminate | boolean | false | When 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. |
disabled | boolean | false | When true , the checkbox cannot be interacted with, and renders in muted colors. |
value | string | '' | The value that will be included if the checkbox is submitted in a form. |
reducedTouchTarget | boolean | false | When true , the checkbox remove padding for touchscreens and increase density. Note, the checkbox will no longer meet accessibility guidelines for touch. |
Events
Event Name | Target | Detail | Description |
---|---|---|---|
change | fwc-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. |
0.5.16
2 years ago
0.5.17
2 years ago
0.7.0
2 years ago
0.6.0
2 years ago
0.5.15
3 years ago
0.5.14
3 years ago
0.5.11
3 years ago
0.5.12
3 years ago
0.5.13
3 years ago
0.5.13-313.0
3 years ago
0.5.10
3 years ago
0.5.9
3 years ago
0.5.9-248.0
3 years ago
0.5.8
4 years ago
0.5.7
4 years ago
0.5.6
4 years ago
0.5.4
4 years ago
0.5.5
4 years ago
0.4.1-filter.7
4 years ago
0.4.1-filter.6
4 years ago
0.4.1-filter.5
4 years ago
0.4.1-filter.4
4 years ago
0.4.1-filter.3
4 years ago
0.4.1-filter.2
4 years ago
0.4.1-filter.1
4 years ago
0.5.3
4 years ago
0.4.1-filter.0
4 years ago
0.5.0
4 years ago
0.5.2
4 years ago
0.5.1
4 years ago
0.4.0
4 years ago
0.3.6
4 years ago
0.3.4
4 years ago
0.3.3
4 years ago
0.3.2
4 years ago
0.3.0
4 years ago
0.3.1
4 years ago
0.2.2
4 years ago
0.2.1
4 years ago
0.2.0
4 years ago