Import
Copy code
import { PasswordInput } from '@k8ordo/ui';Usage
Copy code
<PasswordInput
disabled={false}
invalid={false}
required={false}
placeholder="Enter your password"
/>Controlled
Copy code
const [value, setValue] = useState('hunter2');
<PasswordInput
disabled={false}
invalid={false}
required={false}
onChange={(event) => setValue(event.target.value)}
value={value}
/>Disabled
Copy code
<PasswordInput
defaultValue="read-only-password"
disabled
invalid={false}
required={false}
/>Props
children?- Type:
ReactNode - Default: -
hideLabel?- Type:
string - Default: -
invalid?- Type:
boolean - Default:
false ref?- Type:
Ref<HTMLInputElement> - Default: -
showLabel?- Type:
string - Default: -
| Prop | Type | Default |
|---|---|---|
children? | ReactNode | - |
hideLabel? | string | - |
invalid? | boolean | false |
ref? | Ref<HTMLInputElement> | - |
showLabel? | string | - |
Inherited attributes (except the ones set internally): InputHTMLAttributes<HTMLInputElement>
The wording this component draws (labels, placeholders, and so on) comes from the message dictionary unless a prop sets it. To replace it, see: i18n