Password Input
InputWeb + NativeMITPassword field with show/hide toggle and accessible labeling.
bun add @otfdashkit/ui
Preview
Password InputInput
Loading Storybook preview…
Code
@otfdashkit/uiimport React, { useState } from 'react'
import { Field, PasswordInput } from '@otfdashkit/ui'
function PasswordDemo() {
const [val, setVal] = useState('')
return (
<div className="flex flex-col gap-4 max-w-sm">
<Field label="Password">
<PasswordInput placeholder="Enter password" value={val} onChange={e => setVal(e.target.value)} />
</Field>
<Field label="Password with strength">
<PasswordInput placeholder="Enter password" strength value={val} onChange={e => setVal(e.target.value)} />
</Field>
</div>
)
}
export function Example() {
return (
<PasswordDemo />
)
}
Free with the SDK. This component ships in @otfdashkit/ui under the MIT license.
Props
Props declared in the PasswordInput source. Inherited HTML attributes are not listed.
| Prop | Type | Default | Description |
|---|---|---|---|
| strength | boolean |