Form

Layout wrapper for form sections, rows, and actions. Handles spacing, grid-based rows, and sticky action bars.

Default stacked layout

index.htmlhtml
<form class="ln-form">
  <div class="ln-form__section">
    <h3 class="ln-form__heading">Account details</h3>
    <div class="ln-field">
      <label class="ln-field__label">Email</label>
      <div class="ln-field__control">
        <input type="email" placeholder="[email protected]">
      </div>
    </div>
    <div class="ln-field">
      <label class="ln-field__label">Password</label>
      <div class="ln-field__control">
        <input type="password" placeholder="••••••••">
      </div>
    </div>
  </div>
  <div class="ln-form__actions">
    <button class="ln-button ln-button--solid">Create account</button>
    <button class="ln-button ln-button--ghost">Cancel</button>
  </div>
</form>

Account details

Row layout

index.htmlhtml
<form class="ln-form">
  <div class="ln-form__row">
    <div class="ln-field">
      <label class="ln-field__label">First name</label>
      <div class="ln-field__control">
        <input type="text" placeholder="Jane">
      </div>
    </div>
    <div class="ln-field">
      <label class="ln-field__label">Last name</label>
      <div class="ln-field__control">
        <input type="text" placeholder="Doe">
      </div>
    </div>
  </div>
  <div class="ln-form__actions ln-form__actions--plain ln-form__actions--end">
    <button class="ln-button ln-button--solid">Save</button>
  </div>
</form>

Reference

ClassDescriptionResponsive
.ln-formForm layout containerNo
.ln-form__sectionGrouped section with top border separatorNo
.ln-form__headerSection headingNo
.ln-form__titleSection titleNo
.ln-form__descriptionSection description textNo
.ln-form__rowAuto-fit grid row for side-by-side fieldsNo
.ln-form__actionsAction bar with top borderNo
.ln-form__actions--plainAction bar without top borderNo
.ln-form__actions--endRight-aligned actionsNo
.ln-form__actions--stickySticky action bar at bottomNo
.ln-form--asideTwo-column section layout (label + fields)No
.ln-form--compactReduced spacing between fieldsNo