mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
Added input hints
This commit is contained in:
2
dist/shoelace.css
vendored
2
dist/shoelace.css
vendored
File diff suppressed because one or more lines are too long
@@ -291,6 +291,37 @@
|
||||
<button type="button">Option 3</button>
|
||||
</div>
|
||||
|
||||
<h3 id="input-hints">Input Hints</h3>
|
||||
<p>You can add textual hints below form controls with the <code>input-hint</code> class.</p>
|
||||
<pre><code class="lang-html"><div class="input-field">
|
||||
<label>Name</label>
|
||||
<input type="text">
|
||||
<p class="input-hint">What do people call you?</p>
|
||||
</div>
|
||||
|
||||
<div class="input-field">
|
||||
<label>Age</label>
|
||||
<input type="number">
|
||||
<p class="input-hint">Enter your age in years</p>
|
||||
</div>
|
||||
</code></pre>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-field">
|
||||
<label>Name</label>
|
||||
<input type="text">
|
||||
<p class="input-hint">What do people call you?</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-field">
|
||||
<label>Age</label>
|
||||
<input type="number">
|
||||
<p class="input-hint">Enter your age in years</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 id="input-addons">Input Addons</h3>
|
||||
<p>To create an input addon, use <code><span class="input-addon"></code>. Addons can appear anywhere inside an input group. Use the <code>input-addon-[xs|sm|lg|xl]</code> modifiers to change the size to match adjacent form controls.</p>
|
||||
<pre><code class="lang-html"><div class="input-group">
|
||||
|
||||
@@ -257,11 +257,19 @@ input[type="range"] {
|
||||
}
|
||||
}
|
||||
|
||||
/* Input singles */
|
||||
/* Input fields */
|
||||
.input-field {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
/* Input hints */
|
||||
.input-hint {
|
||||
font-size: var(--input-hint-font-size);
|
||||
color: var(--input-hint-color);
|
||||
margin: .25rem 0 0 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Input groups */
|
||||
.input-group {
|
||||
width: 100%;
|
||||
|
||||
@@ -326,6 +326,9 @@
|
||||
--input-addon-bg-color: var(--component-bg-color);
|
||||
--input-addon-color: var(--body-color-muted);
|
||||
|
||||
--input-hint-color: var(--body-color-muted);
|
||||
--input-hint-font-size: var(--font-size-small);
|
||||
|
||||
--input-icon-width: 2em;
|
||||
--input-icon-offset: .5em;
|
||||
--input-icon-color: var(--state-secondary);
|
||||
|
||||
@@ -260,6 +260,41 @@ Form controls and buttons can be grouped by wrapping them in `input-group` conta
|
||||
<button type="button">Option 3</button>
|
||||
</div>
|
||||
|
||||
### Input Hints
|
||||
|
||||
You can add textual hints below form controls with the `input-hint` class.
|
||||
|
||||
```html
|
||||
<div class="input-field">
|
||||
<label>Name</label>
|
||||
<input type="text">
|
||||
<p class="input-hint">What do people call you?</p>
|
||||
</div>
|
||||
|
||||
<div class="input-field">
|
||||
<label>Age</label>
|
||||
<input type="number">
|
||||
<p class="input-hint">Enter your age in years</p>
|
||||
</div>
|
||||
```
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-field">
|
||||
<label>Name</label>
|
||||
<input type="text">
|
||||
<p class="input-hint">What do people call you?</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-field">
|
||||
<label>Age</label>
|
||||
<input type="number">
|
||||
<p class="input-hint">Enter your age in years</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
### Input Addons
|
||||
|
||||
To create an input addon, use `<span class="input-addon">`. Addons can appear anywhere inside an input group. Use the `input-addon-[xs|sm|lg|xl]` modifiers to change the size to match adjacent form controls.
|
||||
|
||||
Reference in New Issue
Block a user