@shcnwc/shadcn-input-otp-web-component
v1.3.2
Published
Accessible one-time password component with copy paste functionality.
Readme
Input OTP
Accessible one-time password component with copy paste functionality.
Installation
npm install @shcnwc/shadcn-input-otp-web-componentUsage
<script type="module">
import "@shcnwc/shadcn-input-otp-web-component";
</script>
<inputotp-root maxlength={6}>
{#snippet children({ cells })}
<inputotp-group>
{#each cells-slice(0, 3) as cell}
<inputotp-slot {cell} />
{/each}
</inputotp-group>
<inputotp-separator />
<inputotp-group>
{#each cells-slice(3, 6) as cell}
<inputotp-slot {cell} />
{/each}
</inputotp-group>
{/snippet}
</inputotp-root>Links
Contributing
Contributions are welcome! Please open an issue or pull request on GitHub.
License
This project is licensed under the MIT License.
