Skip to content
v0.9.1
Utilities

Display & flex

Show and hide things, lay them in rows or columns, and line them up. All of these have screen-size versions: hidden md:block hides on phones and shows from 768px.

Rows and columns

DesignResearchWritingCode
<div class="flex flex-wrap gap-2">
  <span class="tag">Design</span><span class="tag">Research</span><span class="tag">Writing</span><span class="tag">Code</span>
</div>
<div class="flex flex-col gap-2 mt-4 max-w-xs">
  <button class="btn btn-block" type="button">Continue with email</button>
  <button class="btn btn-block btn-ghost" type="button">I have an account</button>
</div>

Push apart, center, fill

justify-between sends the first and last child to the ends; ms-auto on one child pushes it (and everything after) to the end. flex-1 makes a child take the leftover room.

Notifications4
<div class="flex items-center gap-3 p-3 box">
  <i class="mi mi-search text-muted" aria-hidden="true"></i>
  <input class="form-control flex-1" placeholder="Search projects" aria-label="Search projects">
  <button class="btn btn-brand" type="button">Search</button>
</div>
<div class="flex items-center gap-2 p-3 box mt-3">
  <b>Notifications</b><span class="badge badge-count">4</span>
  <button class="btn btn-sm btn-ghost ms-auto" type="button">Mark all read</button>
</div>

Show on some screens

You are on a small screen.
<div class="box p-4">
  <span class="md:hidden">You are on a small screen.</span>
  <span class="hidden md:inline">You are on a screen 768px or wider.</span>
</div>

hidden removes an element from the page and from screen readers. To hide something only visually, use visually-hidden.

Display

ClassCSS
blockdisplay: block;
inline-blockdisplay: inline-block;
inlinedisplay: inline;
flexdisplay: flex;
inline-flexdisplay: inline-flex;
griddisplay: grid;
inline-griddisplay: inline-grid;
contentsdisplay: contents;
flow-rootdisplay: flow-root;
hiddendisplay: none;

Flex

ClassCSS
flex-rowflex-direction: row;
flex-colflex-direction: column;
flex-row-reverseflex-direction: row-reverse;
flex-col-reverseflex-direction: column-reverse;
flex-wrapflex-wrap: wrap;
flex-nowrapflex-wrap: nowrap;
flex-wrap-reverseflex-wrap: wrap-reverse;
flex-1flex: 1 1 0%;
flex-autoflex: 1 1 auto;
flex-initialflex: 0 1 auto;
flex-noneflex: none;
growflex-grow: 1;
grow-0flex-grow: 0;
shrinkflex-shrink: 1;
shrink-0flex-shrink: 0;
order-firstorder: -9999;
order-lastorder: 9999;
order-noneorder: 0;
order-1order: 1;
order-2order: 2;
order-3order: 3;
order-4order: 4;
order-5order: 5;
order-6order: 6;

Alignment

Works in flex and grid boxes. items-* lines children up across the row, justify-* along it, self-* moves one child.

ClassCSS
items-startalign-items: flex-start;
items-centeralign-items: center;
items-endalign-items: flex-end;
items-stretchalign-items: stretch;
items-baselinealign-items: baseline;
self-startalign-self: flex-start;
self-centeralign-self: center;
self-endalign-self: flex-end;
self-stretchalign-self: stretch;
self-baselinealign-self: baseline;
self-autoalign-self: auto;
justify-startjustify-content: flex-start;
justify-centerjustify-content: center;
justify-endjustify-content: flex-end;
justify-betweenjustify-content: space-between;
justify-aroundjustify-content: space-around;
justify-evenlyjustify-content: space-evenly;
justify-stretchjustify-content: stretch;
content-startalign-content: flex-start;
content-centeralign-content: center;
content-endalign-content: flex-end;
content-betweenalign-content: space-between;
content-aroundalign-content: space-around;
content-evenlyalign-content: space-evenly;
content-stretchalign-content: stretch;
justify-items-startjustify-items: start;
justify-items-centerjustify-items: center;
justify-items-endjustify-items: end;
justify-items-stretchjustify-items: stretch;
justify-self-autojustify-self: auto;
justify-self-startjustify-self: start;
justify-self-centerjustify-self: center;
justify-self-endjustify-self: end;
justify-self-stretchjustify-self: stretch;
place-items-startplace-items: start;
place-items-centerplace-items: center;
place-items-endplace-items: end;
place-items-stretchplace-items: stretch;
place-items-baselineplace-items: baseline;
place-content-startplace-content: start;
place-content-centerplace-content: center;
place-content-endplace-content: end;
place-content-betweenplace-content: space-between;
place-content-aroundplace-content: space-around;
place-content-evenlyplace-content: space-evenly;
place-content-stretchplace-content: stretch;
place-self-autoplace-self: auto;
place-self-startplace-self: start;
place-self-centerplace-self: center;
place-self-endplace-self: end;
place-self-stretchplace-self: stretch;

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