5.0.4 • Published 1 year ago

@axa-ch/toggle-switch v5.0.4

Weekly downloads
92
License
Copyright 2021 AX...
Repository
github
Last release
1 year ago

AXA Toggle Switch

<axa-toggle-switch> provides a UI element for toggling between two states, active and inactive. You can use it in React controlled components.

Properties

checked

The Boolean attribute checked sets the visual state of the toggle switch to active, if true, and inactive otherwise. If checked is defined when first set under React, controlled-component mode is activated.

disabled

The Boolean attribute disabled, when true, disables the toggle switch natively.

error

The string attribute error sets an error text. Leave error empty, if you do not want an error text.

onToggle

The function-valued attribute onToggle can be used as a callback prop for React and other frameworks.

The callback prop value has the following Typescript signature:

    onToggle?: (checked: boolean) => void;

Events

Both a change event and a Custom Event are fired on the component itself. The events bubble and are cancellable. The Custom Event axa-toggle-switch-toggle's detail property contains {checked: boolean}, where the meaning of checked is as defined above for the same-named property.

5.0.4

1 year ago

5.0.3

1 year ago

5.0.2

1 year ago

5.0.1

2 years ago

5.0.0

2 years ago

4.0.5

2 years ago

4.0.4

2 years ago

4.0.6

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.0.3

2 years ago

4.0.2

2 years ago

3.0.0

2 years ago

2.1.3

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

1.1.2

3 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

1.0.0-beta.2

4 years ago

1.0.0-beta.3

4 years ago

1.0.0-beta.1

4 years ago

1.0.0-beta.0

4 years ago