Repository navigation
v2.0.0-beta.6 (gen2)
Pre-releaseThis beta introduces <swc-text-field>, the Spectrum 2 text field, with accessible labelling, validation, and native form participation. It supports sizes s through xl, top or side label positions, a non-interactive prefix slot, and field-status for disabled, read-only, invalid, and valid states. Fields take part in FormData, honor ancestor fieldset disabling, submit on Enter, and restore their initial value on form reset.
It also reworks <swc-prompt-field> accessibility. Send and stop are now a single persistent button, so focus stays put when generating toggles and screen readers announce the new name on the focused control. The textarea is named directly instead of through visually hidden text.
⚠️ Important: this release contains breaking changes to the beta API. On<swc-prompt-field>, every attribute that sets a non-visible name now ends in-accessible-label.labelis removed in favor ofaccessible-label(default "AI prompt"), andsend-label,stop-label,upload-label,attachment-strip-label, and the two attachment scroll labels are all renamed to match. Separately, horizontal padding increased for large and extra-large Button and Action Button (14pxto16px, and16pxto18px), which widens those buttons and any component that contains one.
Install: npm i @adobe/spectrum-wc@2.0.0-beta.6