Skip to content
v0.9.1
Forms

Fields & labels

Labels, text fields, hints and validation. Fields are flat; on focus they get a thick outline in the brand color. Text is 16px so phones never zoom in.

Field

Wrap a .form-label, a .form-control and an optional .form-hint in .form-field. Click into the field to see the focus outline.

Shown on your profile and in comments.

<div class="form-field">
  <label class="form-label" for="f-name">Display name</label>
  <input class="form-control" id="f-name" value="Alexander K.">
  <p class="form-hint">Shown on your profile and in comments.</p>
</div>
<div class="form-field">
  <label class="form-label" for="f-email">Email address</label>
  <input class="form-control" id="f-email" type="email" placeholder="you@example.com" autocomplete="email">
</div>

Label case

Labels show text as written. Add .uppercase for the loud look. Mark optional or required fields inside the label.

<div class="form-field">
  <label class="form-label uppercase" for="f-company">Company</label>
  <input class="form-control" id="f-company" placeholder="Momo Studio">
</div>
<div class="form-field">
  <label class="form-label" for="f-web">Website <span class="form-optional">(optional)</span></label>
  <input class="form-control" id="f-web" type="url" placeholder="https://">
</div>
<div class="form-field">
  <label class="form-label" for="f-user">Username <span class="form-required" aria-hidden="true">*</span></label>
  <input class="form-control" id="f-user" required>
</div>

Textarea and select

.form-control works on a <textarea> (it grows taller by dragging). .form-select becomes a Momo dropdown when momo.js is on the page (see Select for search, icons and multiple). Without JavaScript, Chrome and Edge still show a styled list.

<div class="form-field">
  <label class="form-label" for="f-bio">Short bio</label>
  <textarea class="form-control" id="f-bio" placeholder="A few words about you"></textarea>
</div>
<div class="form-field">
  <label class="form-label" for="f-role">Role</label>
  <select class="form-select" id="f-role">
    <option>Designer</option>
    <option>Developer</option>
    <option>Manager</option>
  </select>
</div>

Ink fields

.form-ink turns a field black with light text. Its focus outline uses the brand color. It works on selects too.

<div class="form-grid">
  <div class="form-field">
    <label class="form-label" for="f-ink">Card holder</label>
    <input class="form-control form-ink" id="f-ink" placeholder="Start typing …">
  </div>
  <div class="form-field">
    <label class="form-label" for="f-ink-sel">Currency</label>
    <select class="form-select form-ink" id="f-ink-sel"><option value="" disabled selected>Select item</option><option>USD</option><option>BTC</option></select>
  </div>
</div>

Icons in fields

Wrap the field in .form-icon with a Moey icon first. .form-icon-end puts the icon on the right.

<div class="form-field">
  <label class="form-label" for="f-search">Search</label>
  <div class="form-icon">
    <i class="mi mi-search"></i>
    <input class="form-control" id="f-search" type="search" placeholder="Search projects">
  </div>
</div>
<div class="form-field">
  <label class="form-label" for="f-date">Due date</label>
  <div class="form-icon form-icon-end">
    <i class="mi mi-calendar"></i>
    <input class="form-control" id="f-date" placeholder="Oct 24, 2026">
  </div>
</div>

Joined group

.input-group joins text (.input-addon), fields and buttons into one bordered row. The whole group lifts on focus.

https:// .momo.app
<div class="form-field">
  <label class="form-label" for="f-site">Site address</label>
  <div class="input-group">
    <span class="input-addon">https://</span>
    <input class="form-control" id="f-site" placeholder="yourname">
    <span class="input-addon">.momo.app</span>
  </div>
</div>
<div class="form-field">
  <label class="form-label" for="f-invite">Invite by email</label>
  <div class="input-group">
    <input class="form-control" id="f-invite" type="email" placeholder="friend@example.com">
    <button class="btn btn-brand" type="button"><i class="mi mi-send"></i> Invite</button>
  </div>
</div>
<div class="form-field">
  <label class="form-label" for="f-amount">Amount</label>
  <div class="input-group">
    <span class="input-addon"><i class="mi mi-dollar-sign"></i></span>
    <input class="form-control" id="f-amount" inputmode="decimal" placeholder="0.00">
    <select class="form-select" aria-label="Currency">
      <option>USD</option>
      <option>CAD</option>
      <option>EUR</option>
    </select>
  </div>
</div>

Validation

Add .is-invalid or .is-valid, with a .form-error or .form-ok message. Fields with required, type="email" and similar also turn red on their own once the person has typed something wrong.

Enter a full email address.

That name is free.

<div class="form-field">
  <label class="form-label" for="f-bad">Email address</label>
  <input class="form-control is-invalid" id="f-bad" type="email" value="alex@" aria-invalid="true" aria-describedby="f-bad-msg">
  <p class="form-error" id="f-bad-msg"><i class="mi mi-circle-alert"></i> Enter a full email address.</p>
</div>
<div class="form-field">
  <label class="form-label" for="f-good">Username</label>
  <input class="form-control is-valid" id="f-good" value="momo" aria-describedby="f-good-msg">
  <p class="form-ok" id="f-good-msg"><i class="mi mi-circle-check"></i> That name is free.</p>
</div>
<div class="form-field">
  <label class="form-label" for="f-live">Try it: type a wrong email, then click away</label>
  <input class="form-control" id="f-live" type="email" placeholder="you@example.com">
</div>

Sizes and states

<div class="form-field">
  <input class="form-control form-control-sm" placeholder="Small" aria-label="Small field">
</div>
<div class="form-field">
  <input class="form-control" placeholder="Default" aria-label="Default field">
</div>
<div class="form-field">
  <input class="form-control form-control-lg" placeholder="Large" aria-label="Large field">
</div>
<div class="form-field">
  <input class="form-control" value="Disabled" disabled aria-label="Disabled field">
</div>
<div class="form-field">
  <input class="form-control" value="Read only: INV-00123" readonly aria-label="Read-only field">
</div>

Layout

.form-grid puts fields side by side and stacks them on phones; .form-span takes the full row. .form-field-row puts the label on the left on wide screens. .form-actions lines up the buttons.

The label sits on the left from 768px wide.

<div class="form-grid">
  <div class="form-field">
    <label class="form-label" for="f-first">First name</label>
    <input class="form-control" id="f-first" autocomplete="given-name">
  </div>
  <div class="form-field">
    <label class="form-label" for="f-last">Last name</label>
    <input class="form-control" id="f-last" autocomplete="family-name">
  </div>
  <div class="form-field form-span">
    <label class="form-label" for="f-street">Street address</label>
    <input class="form-control" id="f-street" autocomplete="street-address">
  </div>
</div>
<div class="form-field form-field-row">
  <label class="form-label" for="f-team">Team name</label>
  <input class="form-control" id="f-team" value="Neo studio">
  <p class="form-hint">The label sits on the left from 768px wide.</p>
</div>
<div class="form-actions">
  <button class="btn btn-brand" type="submit">Save</button>
  <button class="btn btn-ghost" type="reset">Cancel</button>
</div>

Label beside the field

.form-horizontal on the form puts each label beside its field: the usual settings page. --form-label-width sets the label column (10rem). On phones the labels go back on top. For one field only, use .form-field-row.

Shown on receipts.

A color field is a small square that opens the color picker.

<form class="form-horizontal" id="fm-horizontal" style="max-width: 34rem" onsubmit="return false">
  <div class="form-field"><label class="form-label" for="fh-shop">Shop name</label><input class="form-control" id="fh-shop" value="Momo Goods"></div>
  <div class="form-field"><label class="form-label" for="fh-mail">Contact email</label><input class="form-control" id="fh-mail" type="email" value="hello@example.com"><p class="form-hint">Shown on receipts.</p></div>
  <div class="form-field"><label class="form-label" for="fh-color">Brand color</label><input class="form-control" id="fh-color" type="color" value="#a78bfa" aria-describedby="fh-color-hint"><p class="form-hint" id="fh-color-hint">A color field is a small square that opens the color picker.</p></div>
</form>

Fields in one row

.form-inline lines fields and a button up in one row: a search bar, a filter strip. It wraps when it runs out of room. .form-field-grow lets one field take the space that is left.

<form class="form-inline" id="fm-inline" onsubmit="return false">
  <div class="form-field form-field-grow"><label class="form-label" for="fi-q">Search orders</label><input class="form-control" id="fi-q" type="search" placeholder="Name or order number"></div>
  <div class="form-field"><label class="form-label" for="fi-from">From</label><input class="form-control" id="fi-from" type="date" value="2026-12-01"></div>
  <button class="btn btn-brand" type="submit">Search</button>
</form>

Ghost fields, switched-off groups and error flags

.form-ghost looks like plain text until you point at it or type in it: a title you edit in place. A <fieldset disabled> switches off every field inside it, and the labels fade with them. .form-error-tip shows the error as a small flag under the field, so the form does not jump.

Add the part after the dot, like .com

<div class="stack" style="max-width: 26rem; --stack-gap: 1.25rem">
  <input class="form-control form-ghost font-bold" id="fg-title" value="Spring catalog" aria-label="Project title">
  <fieldset disabled id="fg-off" style="border: 0; padding: 0; margin: 0">
    <div class="form-field"><label class="form-label" for="fg-card">Card number</label><input class="form-control" id="fg-card" placeholder="Not needed on the free plan"></div>
    <label class="check"><input type="checkbox"> Save this card</label>
  </fieldset>
  <div class="form-field">
    <label class="form-label" for="fg-mail">Email</label>
    <input class="form-control is-invalid" id="fg-mail" type="email" value="ana@example" aria-invalid="true" aria-describedby="fg-mail-tip">
    <p class="form-error-tip" id="fg-mail-tip">Add the part after the dot, like .com</p>
  </div>
</div>

Full example

A settings form with sections: <fieldset class="form-section"> and a .section-title legend.

Account
Configuration
<form class="docs-form" action="#">
  <fieldset class="form-section">
    <legend class="section-title square-yellow">Account</legend>
    <div class="form-field">
      <label class="form-label uppercase" for="s-name">Display name</label>
      <input class="form-control" id="s-name" value="Alexander K.">
    </div>
    <div class="form-field">
      <label class="form-label uppercase" for="s-email">Email address</label>
      <div class="form-icon">
        <i class="mi mi-mail"></i>
        <input class="form-control" id="s-email" type="email" value="alex@neostudio.design">
      </div>
    </div>
  </fieldset>
  <fieldset class="form-section">
    <legend class="section-title square-violet">Configuration</legend>
    <div class="form-grid">
      <div class="form-field">
        <label class="form-label uppercase" for="s-lang">Language</label>
        <select class="form-select" id="s-lang">
          <option>English</option>
          <option>Français</option>
        </select>
      </div>
      <div class="form-field">
        <label class="form-label uppercase" for="s-tz">Time zone</label>
        <select class="form-select" id="s-tz">
          <option>Eastern (EST)</option>
          <option>Pacific (PST)</option>
        </select>
      </div>
    </div>
  </fieldset>
  <button class="btn btn-lg btn-block btn-brand" type="submit"><i class="mi mi-save"></i> Save settings</button>
</form>

Accessibility

Variables

VariableDefault
--field-bgSurface
--field-border / --field-shadowInk line (red or green when validated)
--field-height2.75rem (44px)
--form-min220px (column width in .form-grid)

Start

OverviewStart Getting startedStart CustomizeStart

Guides

AccessibilityGuides BreakpointsGuides ChangelogGuides Customize componentsGuides JavaScriptGuides MotionGuides OptimizeGuides PhonesGuides RebootGuides Right-to-left (RTL)Guides Stacking orderGuides Using Momo with AIGuides

Foundations

ColorsFoundations TypographyFoundations ProseFoundations Images & figuresFoundations CodeFoundations Lines & shadowsFoundations Dark modeFoundations

Forms

Checkbox & switchForms ComboboxForms Date pickerForms Date rangeForms Fields & labelsForms File uploadForms Floating labelsForms Number stepperForms PasswordForms PIN codeForms RatingForms SelectForms SliderForms Tag inputForms Time pickerForms ValidationForms

Components

AccordionComponents Alert & bannerComponents AvatarComponents BadgeComponents BreadcrumbComponents ButtonComponents Button groupComponents CalendarComponents CardComponents CarouselComponents ChartsComponents ChipsComponents CollapseComponents Command paletteComponents CommentsComponents Confirm dialogsComponents Cookie bannerComponents Data tableComponents Description listComponents Dialog & toastComponents DividerComponents DrawerComponents Dropdown menuComponents Empty stateComponents File managerComponents Filter & sortComponents Gallery & lightboxComponents Inbox & chatComponents Infinite scrollComponents KanbanComponents Keyboard shortcutsComponents List groupComponents MarqueeComponents Media objectComponents Nav overflowComponents Notification centerComponents PaginationComponents ProgressComponents Pull to refreshComponents SkeletonComponents SortableComponents SpinnerComponents Split viewComponents Stat cardComponents Steps & wizardComponents Swipe actionsComponents TableComponents TabsComponents TimelineComponents TogglerComponents Tooltip & popoverComponents TourComponents Tree viewComponents VideoComponents WhiteboardComponents

Layout

Announcement barLayout App shellLayout Back to topLayout Container & sectionLayout ExamplesLayout FooterLayout HeroLayout JumbotronLayout Mega menuLayout NavbarLayout Site sidebarLayout

Sections

Bento gridSections Blog cardsSections Call to actionSections Contact & newsletterSections FAQSections FeaturesSections Logo cloudSections PricingSections TeamSections TestimonialsSections

Utilities

OverviewUtilities State variantsUtilities Display & flexUtilities Grid & gapUtilities SpacingUtilities SizingUtilities TextUtilities Links & color strengthUtilities Position & overflowUtilities BackgroundsUtilities Borders & effectsUtilities Transforms & filtersUtilities InteractionsUtilities

Helpers

Fixed, sticky & frostedHelpers Hover & focusHelpers Hover revealHelpers Icon linkHelpers PrintHelpers Relative timeHelpers Screen reader textHelpers Scroll inHelpers ScrollspyHelpers Share buttonHelpers Skip linkHelpers StacksHelpers Stretched linkHelpers Theme toggleHelpers Truncated textHelpers

Page patterns

404 pagePage patterns Coming soonPage patterns Login & registerPage patterns SettingsPage patterns ProfilePage patterns CRM contactsPage patterns ProjectsPage patterns File manager pagePage patterns Billing & plansPage patterns Help centerPage patterns Mobile app screensPage patterns
↑ ↓ moveEnter openEsc close