Back to Primitives

PasswordField

1:1Forms
View on GitHub

Password input with visibility toggle.

Example
Usage
import { PasswordField } from '@/components/polaris';

function Example() {
    return <PasswordField label="Password" />;
}
Component Source
import { forwardRef, createElement } from 'react';

type Props = JSX.IntrinsicElements['s-password-field'];

/**
 * PasswordField component - secure text input with visibility toggle.
 *
 * @example
 * <PasswordField label="Password" />
 */
export const PasswordField = forwardRef<HTMLElement, Props>((props, ref) =>
    createElement('s-password-field', { ref, ...props })
);

PasswordField.displayName = 'PasswordField';