Filled field, bottom rule
A filled field on the surface color with only a bottom rule, a small label above, and helper text below.
You can change this later.
Enter a number, like 12000.
The code
Plain HTML and CSS on your kit's variables. Put it next to tokens/variables.css from your kit's files and it draws in your look.
<div class="ukc-input-carbon-field">
<div class="f">
<label for="ukc-cf">Project name</label>
<input id="ukc-cf" type="text" placeholder="Kitchen reframe">
<p class="help">You can change this later.</p>
</div>
<div class="f bad">
<label for="ukc-cf2">Budget</label>
<div class="wrapx"><input id="ukc-cf2" type="text" value="12,000 dollars" aria-invalid="true"><span class="ico"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3l9.5 17h-19z"/><path d="M12 10v4M12 17h.01"/></svg></span></div>
<p class="help">Enter a number, like 12000.</p>
</div>
</div>
.ukc-input-carbon-field { position: relative; font-family: var(--uk-font-body, system-ui, sans-serif); color: var(--uk-ink); font-size: 15px; line-height: 1.5;
--tint: color-mix(in srgb, var(--uk-accent) 12%, var(--uk-paper));
--tint-strong: color-mix(in srgb, var(--uk-accent) 22%, var(--uk-paper));
--accent-deep: color-mix(in srgb, var(--uk-accent) 72%, black);
--ink-soft: color-mix(in srgb, var(--uk-ink) 8%, var(--uk-paper));
--line-strong: color-mix(in srgb, var(--uk-ink) 32%, var(--uk-paper));
--danger-tint: color-mix(in srgb, var(--uk-danger) 12%, var(--uk-paper));
--high-tint: color-mix(in srgb, var(--uk-highlight) 28%, var(--uk-paper)); }
.ukc-input-carbon-field *, .ukc-input-carbon-field *::before, .ukc-input-carbon-field *::after { box-sizing: border-box; }
.ukc-input-carbon-field :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-input-carbon-field :where(ul, ol) { padding: 0; list-style: none; }
.ukc-input-carbon-field :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-input-carbon-field :where(a) { color: inherit; }
.ukc-input-carbon-field svg { flex: none; }
.ukc-input-carbon-field .f { display: grid; gap: 6px; max-width: 320px; margin-bottom: 16px; }
.ukc-input-carbon-field label { font-size: 12px; color: var(--uk-muted); letter-spacing: 0.02em; }
.ukc-input-carbon-field input { width: 100%; height: 40px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: var(--uk-surface); font-size: 14px; }
.ukc-input-carbon-field input:focus { outline: 2px solid var(--uk-accent); outline-offset: -2px; }
.ukc-input-carbon-field .help { font-size: 12px; color: var(--uk-muted); }
.ukc-input-carbon-field .wrapx { position: relative; }
.ukc-input-carbon-field .ico { position: absolute; right: 12px; top: 12px; color: var(--uk-danger); }
.ukc-input-carbon-field .bad input { outline: 2px solid var(--uk-danger); outline-offset: -2px; padding-right: 40px; }
.ukc-input-carbon-field .bad .help { color: var(--uk-danger); }
More inputs
All 27- Street and numberEnter a 5 digit ZIP code
One email a month. Unsubscribe from any issue.
- /
- $USDhttps://.apphours
You have 186 characters left94 / 280