mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-25 07:42:05 +08:00
This component can be used for any code to be input by the end user.
Example usage:
```gjs
<DOTP @onFill={{this.onFill}} @onChange={{this.onChange}} @slots={{4}} />
```
It supports:
- variable number of slots
- `@onFill` callback, fired when all the slots are filled
- `@onChange` callback, fired on every change
- pasting
- cleaning input data (eg: when pasting 1 2 3 4 5 6 it will be set as
123456)
- look and feel of digicode
A styleguide has been added to try this component:
`/styleguide/atoms/otp`
|
||
|---|---|---|
| .. | ||
| integration | ||
| system | ||