0.49.0 • Published 1 day ago

@zag-js/checkbox v0.49.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 day ago

@zag-js/checkbox

Core logic for the checkbox widget implemented as a state machine

Installation

yarn add  @zag-js/checkbox
# or
npm i  @zag-js/checkbox

Technical Considerations

  • When the checkbox is surrounded by a form, we consider the effect of form "reset" event with a trackFormReset activity in the machine.
  • When the checkbox is surrounded by fieldset and the fieldset is disabled, we react to set sync the disabled state accordingly with a trackFieldsetDisabled activity in the machine.
  • A name can be passed to the machine object during initialization, which we pass to the input, to ease use in forms.
  • The API exposes a setChecked method to programmatically control the checkbox's state. We automatically dispatch a native event when this is done, so when used in a form, the form can detect those changes.
  • The checkbox machine accepts an indeterminate key, to make it indeterminate by default. The API also exposes a setIndeterminate method, to toggle this programmatically.
  • The API exposed a view variable of type "checked" | "unchecked" | "mixed" so you can render parts, based on the current visual state of the checkbox. mixed is when the checkbox is indeterminate.

Contribution

Yes please! See the contributing guidelines for details.

Licence

This project is licensed under the terms of the MIT license.

0.49.0

11 days ago

0.48.0

17 days ago

0.47.0

22 days ago

0.46.0

27 days ago

0.45.0

1 month ago

0.44.0

1 month ago

0.43.0

1 month ago

0.41.0

1 month ago

0.42.0

1 month ago

0.40.0

1 month ago

0.39.0

2 months ago

0.38.1

2 months ago

0.38.0

2 months ago

0.37.3

2 months ago

0.37.2

3 months ago

0.37.1

3 months ago

0.37.0

3 months ago

0.36.3

3 months ago

0.36.2

3 months ago

0.36.1

3 months ago

0.36.0

3 months ago

0.35.0

3 months ago

0.34.0

3 months ago

0.33.2

3 months ago

0.33.1

3 months ago

0.33.0

4 months ago

0.32.1

4 months ago

0.32.0

4 months ago

0.20.0

8 months ago

0.21.0

8 months ago

0.10.3

10 months ago

0.10.4

10 months ago

0.10.5

10 months ago

0.22.0

8 months ago

0.30.0

6 months ago

0.31.1

5 months ago

0.31.0

5 months ago

0.13.0

10 months ago

0.25.0

7 months ago

0.14.0

9 months ago

0.26.0

7 months ago

0.11.0

10 months ago

0.11.1

10 months ago

0.11.2

10 months ago

0.23.0

7 months ago

0.12.0

10 months ago

0.24.0

7 months ago

0.17.0

9 months ago

0.29.0

6 months ago

0.18.0

8 months ago

0.15.0

9 months ago

0.27.1

6 months ago

0.27.0

6 months ago

0.16.0

9 months ago

0.28.1

6 months ago

0.28.0

6 months ago

0.19.0

8 months ago

0.19.1

8 months ago

0.10.1

11 months ago

0.10.2

11 months ago

0.10.0

11 months ago

0.8.0

12 months ago

0.9.0

12 months ago

0.9.2

12 months ago

0.9.1

12 months ago

0.7.0

1 year ago

0.6.0

1 year ago

0.5.0

1 year ago

0.2.16

1 year ago

0.2.14

1 year ago

0.2.13

1 year ago

0.2.12

1 year ago

0.2.11

1 year ago

0.2.10

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago