Skip to content

OrigamInput ​

<OrigamInput> is the outermost structural wrapper shared by every form atom (Checkbox, Radio, Switch, etc.). It renders the outer prepend/append icons, the messages / hint / error row, and the validation pipeline.

OrigamInput is rarely used directly — prefer the typed atoms. Use it when you need the messages + validation chrome around a fully custom control.

No label prop — the control owns its label ​

<OrigamInput> has no label prop. Its root is a four-area grid (prepend / control / append / messages) with no label area, and the accessible name belongs to the control you hand it through the #default slot, not to the wrapper <div>.

Until 2026-09-07 a label was declared here — inherited from the IValidationProps mixin — and rendered nothing at all. It was removed rather than wired: every component that forwards it already draws its own <label> (measured one tick after mount with label="PROBE_LABEL": Checkbox 1, Switch 1, TextField 2 — static + floating, RatingField 1, SliderField 1, RadioGroup 1, <OrigamInput> alone 0), so painting one here would have produced a duplicate on all six.

Put the label where it renders:

vue
<template>
  <OrigamField label="Email">…</OrigamField>
  <OrigamSelectionControl label="Accept terms" />

  <OrigamInput hint="Helper text">
    <template #default="{ id }">
      <OrigamLabel :for="id" text="Email" />
      <input :id="id" />
    </template>
  </OrigamInput>
</template>

Basic usage ​

vue
<template>
  <OrigamInput hint="Helper text" :rules="[v => !!v || 'Required']">
    <template #default="{ id, isDisabled, isDirty, isValid, isReadonly }">
      <input :id="id" :disabled="isDisabled" />
    </template>
  </OrigamInput>
</template>

Color ​

vue
<template>
  <OrigamInput color="primary" />
  <OrigamInput color="secondary" />
</template>

Density ​

vue
<template>
  <OrigamInput density="compact" />
  <OrigamInput density="default" />
  <OrigamInput density="comfortable" />
</template>

Prepend / append outer icons ​

vue
<template>
  <OrigamInput prepend-icon="mdi-account" append-icon="mdi-chevron-down" />
</template>

Hint & persistent hint ​

vue
<template>
  <OrigamInput hint="We never share your email" persistent-hint />
</template>

Hide details ​

vue
<template>
  <OrigamInput hide-details />
</template>

Error messages ​

vue
<template>
  <OrigamInput :error="true" error-messages="This field is invalid" />
</template>

Slots ​

SlotScopeDescription
default{ id, isDisabled, isDirty, isValid, isReadonly }The form control
prepend—Outer left icon/content
append—Outer right icon/content
messages{ hasMessages, messages }Full messages area
messagemessageSingle message row
detailsanyDetails row override

Emits ​

EventPayloadDescription
update:modelValueanyValue echo
click:prependMouseEventOuter prepend clicked
click:appendMouseEventOuter append clicked

focus and blur are not component emits — IInputEmits does not declare them. They reach the consumer as plain DOM events, relayed by Vue's attribute fallthrough: @focus / @blur bound on <origam-input> work the normal HTML way, they just aren't part of the typed emits contract. <OrigamInput> also does not emit update:focused: its focused prop is read-only input that only decides whether hint stays visible (props.hint && (props.persistentHint || props.focused)) — it is never written back by the component. Components that own real focus state (TextField, NumberField, PasswordField, TextareaField, FileField, OtpInputField, Select) call useFocus and declare update:focused at their own level.

Typography props ​

PropTypeDefaultDescription
fontSizeTFontSizeundefinedFont size token (xs · sm · md · lg · xl · 2xl · 3xl · 4xl · 5xl). Sets --origam-input---font-size.
fontWeightTFontWeightundefinedFont weight token (regular · medium · semibold · bold · extrabold · black). Sets --origam-input---font-weight.
lineHeightTLineHeightundefinedLine-height token (none · tight · snug · normal · relaxed · loose). Sets --origam-input---line-height.

Design tokens ​

CSS variableDefaultDescription
--origam-input---density0pxDensity offset applied to children
--origam-input---messages-colortext-secondaryHint / error text color