-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web components - Text input: Pre-alpha #111
Comments
Text input web component design planLandscape analysisText input code samples from the landscape analysis (Google docs 🔒) Proposed component structureCritical contentThe
Note This solution deviates from the implementations we saw across the landscape. Almost universally, the other design systems in our sample pool opted to build a fully prop-driven component. We decided to go a different path so that the page builds a fully functional and accessible component, even when JavaScript fails or is slow. More information: Conversation about opting for progressive enhancement for text input (Google docs 🔒) Light DOMSample default implementation: <usa-text-input>
<label for="input-type-text">Text input label</label>
<input id="input-type-text" name="input-type-text" />
</usa-text-input> Sample complex variant implementation: <usa-text-input state="error" width="lg">
<label for="input-type-text">Text input label</label>
<div class="usa-hint" id="inputHint">Hint text</div>
<input type="tel" id="input-type-text" name="input-type-text" ariadescribedby="inputHint" />
</usa-text-input> Shadow DOMSame as USWDS 3 <label for="input-type-text" class="usa-label">Text input label</label>
<input id="input-type-text" name="input-type-text" class="usa-input"> VariantsCurrent variants
Proposed additional variants
Note Textarea is currently bundled with the text input in USWDS 3. Because its html structure requires the Note We could consider including some custom styles for common text input types, like PropsCurrent variants
Proposed additional variants
SlotsUnnamed slot CSS Parts
CSS VariablesCurrent settings
Proposed additional setting
Translatable contentN/A |
Next steps
|
Summary
Research and planning tasks
The text was updated successfully, but these errors were encountered: