Skip to content
v0.9.1
Forms

Checkbox & switch

Real checkbox and radio inputs with the Momo look: ink boxes, a yellow fill when on, and a tiny hard shadow on hover. They work without JavaScript.

Checkbox

Put the input inside a <label class="check">: the whole label is clickable.

<div class="check-group">
  <label class="check"><input type="checkbox" checked> Remember me</label>
  <label class="check"><input type="checkbox"> Send me product news</label>
  <label class="check"><input type="checkbox" data-momo-indeterminate> Some files (mixed)</label>
  <label class="check"><input type="checkbox" disabled> Disabled</label>
  <label class="check"><input type="checkbox" checked disabled> Disabled and on</label>
</div>

Radio

Billing
<fieldset class="check-group">
  <legend class="form-label">Billing</legend>
  <label class="check"><input type="radio" name="billing" checked> Monthly</label>
  <label class="check"><input type="radio" name="billing"> Yearly <span class="badge badge-cyan">-20%</span></label>
</fieldset>

With a description

Wrap the text in a <span> and add a .check-desc line.

<div class="check-group">
  <label class="check">
    <input type="checkbox" checked>
    <span>Email digest <small class="check-desc">One email every Monday with what changed.</small></span>
  </label>
  <label class="check">
    <input type="checkbox">
    <span>Mentions <small class="check-desc">Tell me when someone tags me.</small></span>
  </label>
</div>

Switch

.switch for on/off settings that take effect right away. .switch-pill rounds it.

<div class="check-group">
  <label class="switch"><input type="checkbox" role="switch" checked> Notifications</label>
  <label class="switch"><input type="checkbox" role="switch"> Dark mode</label>
  <label class="switch switch-pill"><input type="checkbox" role="switch" checked> Pill switch</label>
  <label class="switch"><input type="checkbox" role="switch" disabled> Disabled</label>
</div>

Switch with words

.switch-text shows a short word in the track from data-on and data-off. Keep the words short (2 to 3 letters).

<div class="check-group">
  <label class="switch switch-text"><input type="checkbox" role="switch" data-on="On" data-off="Off" checked> Email digest</label>
  <label class="switch switch-text"><input type="checkbox" role="switch" data-on="Yes" data-off="No"> Public profile</label>
</div>

Settings rows

.switch-end puts the label first and the switch at the end of the row, like a phone settings screen.

<div class="card">
  <div class="card-section">
    <label class="switch switch-end"><input type="checkbox" role="switch"> Dark mode</label>
  </div>
  <div class="card-section">
    <label class="switch switch-end switch-text"><input type="checkbox" role="switch" data-on="On" data-off="Off" checked> Email digest</label>
  </div>
  <div class="card-section">
    <label class="switch switch-end"><input type="checkbox" role="switch" checked><span>Sounds <small class="check-desc">Play a sound for new messages.</small></span></label>
  </div>
</div>

Colors and sizes

.check-<color> or .switch-<color> changes the "on" color. .check-lg and .switch-lg are bigger.

<label class="check check-green"><input type="checkbox" checked> Green</label>
<label class="check check-violet"><input type="radio" name="clr" checked> Violet</label>
<label class="check check-cyan check-lg"><input type="checkbox" checked> Large cyan</label>
<label class="switch switch-pink"><input type="checkbox" role="switch" checked> Pink</label>
<label class="switch switch-green switch-lg"><input type="checkbox" role="switch" checked> Large green</label>

Inline group

Skills
<fieldset class="check-group check-inline">
  <legend class="form-label">Skills</legend>
  <label class="check"><input type="checkbox" checked> Business</label>
  <label class="check"><input type="checkbox"> Marketing</label>
  <label class="check"><input type="checkbox" checked> Interface design</label>
  <label class="check"><input type="checkbox"> Development</label>
</fieldset>

Choice cards

.check-card makes the whole label a card. The picked one gets a tint and a hard shadow. .check-cards lays them out in a grid.

Plan
<fieldset class="check-group">
  <legend class="form-label">Plan</legend>
  <div class="check-cards">
    <label class="check check-card"><input type="radio" name="plan"><span>Basic <small class="check-desc">$0 / month · 1 user</small></span></label>
    <label class="check check-card"><input type="radio" name="plan" checked><span>Pro <small class="check-desc">$29 / month · 10 users</small></span></label>
    <label class="check check-card"><input type="radio" name="plan"><span>Team <small class="check-desc">$79 / month · unlimited</small></span></label>
  </div>
</fieldset>

Select all

Give a checkbox data-momo-check-all with a selector: it checks or clears every match, and shows a dash when only some are checked. Needs momo.js.

<div class="check-group">
  <label class="check"><input type="checkbox" data-momo-check-all="#files input"> <b>All files</b></label>
  <div class="check-group docs-indent" id="files">
    <label class="check"><input type="checkbox" checked> UI Design.sketch</label>
    <label class="check"><input type="checkbox"> Wireframe for team.figma</label>
    <label class="check"><input type="checkbox"> Presentation approval.key</label>
  </div>
</div>

Validation

You need to agree to continue.

<label class="check"><input type="checkbox" class="is-invalid" aria-invalid="true" aria-describedby="terms-msg"> I agree to the terms</label>
<p class="form-error" id="terms-msg"><i class="mi mi-circle-alert"></i> You need to agree to continue.</p>

Accessibility

Variables

VariableDefault
--check-colorBrand (the "on" fill)
--check-markInk (check, dot and knob when on)
--check-size1.25rem
--check-card-min200px (on .check-cards)

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