Skip to content

OrigamPasswordField ​

<OrigamPasswordField> is a <OrigamTextField type="password"> with a built-in show/hide toggle and an optional strength-requirements popup (minLength, lowercase, uppercase, digit, special character). Each enabled requirement auto-injects a validation rule.

Basic usage with v-model ​

vue
<script setup lang="ts">
import { ref } from 'vue'
const pwd = ref('')
</script>

<template>
  <OrigamPasswordField v-model="pwd" label="Password" />
</template>

Show/hide icons ​

vue
<template>
  <OrigamPasswordField
    label="Password"
    on-icon="mdi-eye"
    off-icon="mdi-eye-off"
  />
</template>

Strength requirements popup ​

vue
<template>
  <OrigamPasswordField
    label="New password"
    requirements
    :min-length="10"
    need-uppercase
    need-number
    need-special
  />
</template>

Persistent requirements ​

vue
<template>
  <OrigamPasswordField label="Password" requirements persistent-requirements />
</template>

States (disabled / readonly / error) ​

vue
<template>
  <OrigamPasswordField label="Disabled" disabled />
  <OrigamPasswordField label="Error"    :error="true" error-messages="Too weak" />
</template>

Slots ​

SlotScopeDescription
info{ [key: string]: any }Custom requirements popup body
counter{ counter, max, value }Custom character counter
field{ id, isDisabled, isDirty, isValid, isReadonly }Replace the <input>
labelILabelPropsCustom label
prependInner—Inside field before input
appendInner—Inside field after input

Emits ​

EventPayloadDescription
update:modelValuestringValue changed
update:focusedbooleanFocus state changed (own useFocus(props) call)
update:strengthTPasswordStrengthLevel ('weak' | 'fair' | 'good' | 'strong')Fires when the computed strength level changes — v-modelable for analytics or cross-field validation
click:controlMouseEventControl clicked
mousedown:controlMouseEventMousedown on control
click:clearMouseEventClear icon clicked
click:prependInnerMouseEventInner prepend adornment clicked
click:appendInnerMouseEventInner append adornment (show/hide toggle) clicked
click:prependMouseEventOuter prepend clicked
click:appendMouseEventOuter append clicked

focus and blur are not component emits — IPasswordFieldEmits does not declare them. They reach the consumer as plain DOM events, relayed by Vue's attribute fallthrough: @focus / @blur bound on <origam-password-field> work the normal HTML way, they just aren't part of the typed emits contract.

Design tokens ​

CSS variableDefaultDescription
--origam-field---border-colorsemantic borderOutline
--origam-password-field---toggle-colortext-secondaryToggle icon color