UNPKG

@k4ung/svelte-otp

Version:

A simple lightweight OTP input component for svelte.

18 lines (16 loc) 1.67 kB
## Available Options | **Name** | **Default Value** | **Description** | | ----------------------- | ----------------- | ----------------------------------------------------------- | | numOfInputs | 6 | Quantity of input to show | | value | '' | The value of the input | | separator | '' | Separator between the individual inputs | | onlyShowMiddleSeparator | false | Only show one separator in the middle (numOfInputs % 2 = 0) | | placeholder | '' | Placeholder value for the inputs | | numberOnly | false | Restrict the values to numbers only | | disableDefaultStyle | false | Disable default styling of component | | wrapperClass | '' | Custom class to be added to the wrapper element | | inputClass | '' | Custom class to be added to the individual inputs | | separatorClass | '' | Custom class to be added to the separators | | wrapperStyle | '' | Inline style to be added to the wrapper element | | inputStyle | '' | Inline style to be added to the individual inputs | | separatorStyle | '' | Inline style to be added to the separators |