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
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
actionDisabled | action-disabled | Keep the action off regardless of the value — e.g. nothing chosen yet. | boolean | false |
actionIcon | action-icon | The action button’s icon (an eds-icon-wrapper name) and its accessible label (tooltip + aria-label). | string | 'checkmark' |
actionLabel | action-label | string | 'Submit' | |
ariaLabel | aria-label | Accessible label for the field itself. | string | null |
autocomplete | autocomplete | The 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. | string | undefined |
disabled | disabled | boolean | false | |
inverse | inverse | Light-on-dark, for use on a dark band. | boolean | false |
loading | loading | Disables the control and spins the action button. | boolean | false |
name | name | Name for the inner field (forms, labels). | string | undefined |
options | options | Options 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 |
placeholder | placeholder | string | undefined | |
type | type | The 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' |
value | value | The current value (two-way: also emitted on edsinput/edschange). | string | '' |
variant | variant | ‘rounded’ is a pill; ‘default’ is the classic squared-off border radius. | "default" | "rounded" | 'rounded' |
Events
| Event | Description | Type |
|---|---|---|
edsaction | Fired when the action button is pressed (or Enter in a text field). | CustomEvent<void> |
edschange | Fired when a select’s value changes (and on text commit). | CustomEvent<{ value: string; }> |
edsinput | Fired 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