eds-input-action

Overview

A single-value field — text, number, or select — with an action button laid INSIDE its right end, as one control (the “composer” pattern: a scope select with its Collect button, an answer field with its Declare tick, an email field with its Share button). One component so every such pair looks and behaves the same: shared border, focus ring, disabled and loading states.

It is NOT for multi-select (a checkbox group) — only a value you type or a single option you pick, then confirm.

Properties

PropertyAttributeDescriptionTypeDefault
actionDisabledaction-disabledKeep the action off regardless of the value — e.g. nothing chosen yet.booleanfalse
actionIconaction-iconThe action button’s icon (an eds-icon-wrapper name) and its accessible label (tooltip + aria-label).string'checkmark'
actionLabelaction-labelstring'Submit'
ariaLabelaria-labelAccessible label for the field itself.stringnull
autocompleteautocompleteThe field’s autocomplete. Left to the browser by default (autofill works, but its tint is made transparent in CSS so the pill shows through); pass ‘off’ to suppress it on a given field.stringundefined
disableddisabledbooleanfalse
inverseinverseLight-on-dark, for use on a dark band.booleanfalse
loadingloadingDisables the control and spins the action button.booleanfalse
namenameName for the inner field (forms, labels).stringundefined
optionsoptionsOptions for type="select", as a { value, label }[] array or a JSON string of one. An option with an empty value is the disabled placeholder.string | { value: string | number; label: string; }[]undefined
placeholderplaceholderstringundefined
typetypeThe kind of field. ‘select’ needs options; the rest are free entry. ’email’ validates a basic address before the action can fire. NOT for passwords: this control emits its value through events, so a secret would leak — password fields stay on eds-input-field, which suppresses that."email" | "number" | "select" | "text" | "url"'text'
valuevalueThe current value (two-way: also emitted on edsinput/edschange).string''
variantvariant‘rounded’ is a pill; ‘default’ is the classic squared-off border radius."default" | "rounded"'rounded'

Events

EventDescriptionType
edsactionFired when the action button is pressed (or Enter in a text field).CustomEvent<void>
edschangeFired when a select’s value changes (and on text commit).CustomEvent<{ value: string; }>
edsinputFired on every keystroke of a text/number field.CustomEvent<{ value: string; }>

Dependencies

Depends on

Graph

graph TD;
  eds-input-action --> eds-icon-wrapper
  style eds-input-action fill:#f9f,stroke:#333,stroke-width:4px

Built with StencilJS