@yamada-ui/password-input
Version:
Yamada UI password input component
46 lines (43 loc) • 1.46 kB
text/typescript
import * as _yamada_ui_core from '@yamada-ui/core';
import { HTMLUIProps, ThemeProps, ColorModeToken, CSS } from '@yamada-ui/core';
import { ReactElement } from 'react';
import { UsePasswordInputProps } from './use-password-input.mjs';
import '@yamada-ui/form-control';
interface PasswordInputOptions {
/**
* The border color when the input is invalid.
*/
errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, "colors">;
/**
* The border color when the input is focused.
*/
focusBorderColor?: ColorModeToken<CSS.Property.BorderColor, "colors">;
/**
* The icons to be used for the visibility toggle.
*/
visibilityIcon?: {
off: ReactElement;
on: ReactElement;
};
/**
* The props for the container element.
*/
containerProps?: HTMLUIProps;
/**
* The props for the icon element.
*/
iconProps?: HTMLUIProps;
/**
* The props for the input element.
*/
inputProps?: HTMLUIProps<"input">;
}
interface PasswordInputProps extends HTMLUIProps<"input">, ThemeProps<"PasswordInput">, UsePasswordInputProps, PasswordInputOptions {
}
/**
* `PasswordInput` is a component that allows users to input passwords with a visibility toggle.
*
* @see Docs https://yamada-ui.com/components/forms/password-input
*/
declare const PasswordInput: _yamada_ui_core.Component<"div", PasswordInputProps>;
export { PasswordInput, type PasswordInputProps };