@3mo/disabled-property
v1.1.5
Published
A decorator for a reflected disabled property with aria-disabled, optionally taking the element out of the tab order.
Readme
Disabled Property
A decorator for a reflected disabled property with aria-disabled, optionally taking the element out of the tab order.
Installation
npm install @3mo/disabled-propertyimport { disabledProperty } from '@3mo/disabled-property'Examples
- Default — The decorated
disabledproperty reflects to an attribute and setsaria-disabled. - Block Focus — With
blockFocus, a disabled element leaves the tab order and gets itstabindexback once enabled.
API
Exports
| Name | Kind | Description |
| --- | --- | --- |
| disabledProperty | const | A decorator for a reflected disabled property that sets aria-disabled and, with blockFocus, takes the element out of the tab order while disabled. |
Links
License
MIT © 3MO GmbH
