Back to library

Split text field

Group short fields that form one value, such as an expiry date.

Expiry date

Recommended API

Property or elementTypeExample initial valueDescription
inputmode and maxlengthHTML attributesnumeric, 2 per fieldSplit a numeric expiry date into short parts.
LabelsTextMonth and yearIdentify what each input expects.

States

StateTriggerResult
editingType into either input.Each field holds its own part of the date.

CSS variables

VariableTypeDefaultDescription
--q-textcolor #28302aMain text and foreground color.
--q-mutedcolor #70776fColor for secondary text.
--q-font-sizelength 13pxBase size for the component text.
--q-accentcolor #344e41Accent for active controls, indicators and focus.
--q-surfacecolor #ffffffSurface for controls and cards.
--q-bordercolor #dce0d8Color for outlines and dividers.
--q-radiuslength 10pxBase corner radius.
--q-gaplength calc(var(--q-space) * 2)Space between items, based on the spacing unit.
--q-control-pxlength calc(var(--q-space) * 4)Horizontal padding for controls.
--q-control-pylength calc(var(--q-space) * 2.5)Vertical padding for controls.
--q-spacelength 4pxBase unit for gaps and padding.