Password Field

Live example


Properties

Name

Values

Default

hasVisibilityToggle
Enables the visibility toggle button

boolean

false

iconLeft

IconName

 

iconRight

IconName

 

as

'input' | 'select' | 'textarea'

'input'

accepts all FieldProps

FieldProps
see Properties section

 

...

JSX.IntrinsicElements["input"]

 

Native Properties

Name

Values

Default

label (required)

string

 

hasVisibilityToggle

boolean

false

iconLeft

IconName

 

iconRight

IconName

 

Omit<FieldProps, 'children'>
& InputProps

false


Composition

Password field composition 1
  1. Label text
  2. Hint text
  3. Input text
  4. Input border
  5. Show/hide password icon
Password field composition 2

 

Tokens

 

Text color

color.surface.onsurface

Hint text color

color.surface.onsurfacevariant

Input border color

input.color.border

Text font weight

font.family.bold

Hint text font weight

font.family.book

Text size

font.size.md

Text line height

font.lineheight.md

Padding

space.100 space.200

Input border width

border.width.md