Bootstrap 4 Cheat Sheet

This is the cheat sheet for bootstrap 4 listing many of the classes you need to get a better overview for bootstrap 4. Let me know if you would like to add something or if anything is wrong! Enjoy!

Cheat Sheet

ClassDescription
.containerCentered container with fixed width
.container-fluidFull width container
.rowHorizontal grouping of columns
.col-*Column with specified width
.colAuto width column
.col-sm-*Column with specified width on small screens
.col-md-*Column with specified width on medium screens
.col-lg-*Column with specified width on large screens
.col-xl-*Column with specified width on extra large screens
.col-1 to .col-12Columns with specified width
.offset-*Offset a column by specified number of columns
.order-*Change the order of columns
.justify-content-*Align columns horizontally
.align-items-*Align columns vertically
.align-self-*Align a single column vertically
.text-*Align text
.bg-*Background color
.text-*Text color
.border-*Border
.rounded-*Rounded corners
.shadow-*Box shadow
.d-*Display property
.flex-*Flexbox
.float-*Float
.position-*Position
.fixed-*Fixed position
.sticky-*Sticky position
.visible-*Visibility
.invisibleHide element
.sr-onlyHide element visually but keep for screen readers
.sr-only-focusableHide element visually but keep for screen readers and make focusable
.showShow element
.hideHide element
.collapseHide element with animation
.navbarNavigation bar
.navbar-expand-*Expand navigation bar on specified screen size
.navbar-lightLight navigation bar
.navbar-darkDark navigation bar
.navbar-brandBrand logo or name
.navbar-togglerButton to toggle navigation bar
.navbar-navNavigation links
.nav-itemNavigation link item
.nav-linkNavigation link
.dropdownDropdown menu
.dropdown-toggleButton to toggle dropdown menu
.dropdown-menuDropdown menu items
.dropdown-itemDropdown menu item
.dropdown-headerDropdown menu header
.dropdown-dividerDivider between dropdown menu items
.badgeBadge
.badge-*Badge with specified color
.alertAlert message
.alert-*Alert message with specified color
.alert-dismissibleAlert message with close button
.closeClose button
.modalModal dialog
.modal-dialogModal dialog container
.modal-contentModal dialog content
.modal-headerModal dialog header
.modal-bodyModal dialog body
.modal-footerModal dialog footer
.carouselImage carousel
.carousel-itemImage carousel item
.carousel-control-prevPrevious image carousel button
.carousel-control-nextNext image carousel button
.carousel-indicatorsImage carousel indicators
.list-groupList group
.list-group-itemList group item
.list-group-item-actionList group item with hover effect
.list-group-item-*List group item with specified color
.list-group-flushRemove borders from list group items
.cardCard
.card-headerCard header
.card-bodyCard body
.card-footerCard footer
.card-titleCard title
.card-subtitleCard subtitle
.card-textCard text
.card-img-topCard image
.card-deckDeck of cards
.card-groupGroup of cards
.accordionAccordion
.accordion-itemAccordion item
.accordion-headerAccordion header
.accordion-bodyAccordion body
.breadcrumbBreadcrumb
.breadcrumb-itemBreadcrumb item
.paginationPagination
.page-itemPagination item
.page-linkPagination link
.badge-pillPill shaped badge
.rounded-0Remove rounded corners
.text-centerCenter align text
.text-leftLeft align text
.text-rightRight align text
.text-justifyJustify text
.text-nowrapPrevent text from wrapping
.text-lowercaseConvert text to lowercase
.text-uppercaseConvert text to uppercase
.text-capitalizeCapitalize first letter of each word
.font-weight-boldBold text
.font-weight-normalNormal text
.font-italicItalic text
.leadLarge font size
.display-*Display property
.d-print-*Display property for printing
.d-noneHide element
.d-inlineInline element
.d-inline-blockInline block element
.d-blockBlock element
.d-tableTable element
.d-table-rowTable row element
.d-table-cellTable cell element
.flex-rowFlexbox row
.flex-columnFlexbox column
.flex-wrapWrap flexbox items
.justify-content-startAlign flexbox items to start
.justify-content-endAlign flexbox items to end
.justify-content-centerCenter align flexbox items
.justify-content-betweenSpace between flexbox items
.justify-content-aroundSpace around flexbox items
.align-items-startAlign flexbox items to start
.align-items-endAlign flexbox items to end
.align-items-centerCenter align flexbox items
.align-items-baselineAlign flexbox items to baseline
.align-items-stretchStretch flexbox items
.align-content-startAlign flexbox content to start
.align-content-endAlign flexbox content to end
.align-content-centerCenter align flexbox content
.align-content-betweenSpace between flexbox content
.align-content-aroundSpace around flexbox content
.align-content-stretchStretch flexbox content
.align-self-startAlign single flexbox item to start
.align-self-endAlign single flexbox item to end
.align-self-centerCenter align single flexbox item
.align-self-baselineAlign single flexbox item to baseline
.align-self-stretchStretch single flexbox item
.float-leftFloat element to left
.float-rightFloat element to right
.float-noneDo not float element
.position-staticStatic position
.position-relativeRelative position
.position-absoluteAbsolute position
.position-fixedFixed position
.position-stickySticky position
.fixed-topFixed position at top
.fixed-bottomFixed position at bottom
.sticky-topSticky position at top
.invisibleHide element
.visibleShow element
.text-hideHide text visually but keep for screen readers
.bg-primaryPrimary background color
.bg-secondarySecondary background color
.bg-successSuccess background color
.bg-dangerDanger background color
.bg-warningWarning background color
.bg-infoInfo background color
.bg-lightLight background color
.bg-darkDark background color
.bg-whiteWhite background color
.text-primaryPrimary text color
.text-secondarySecondary text color
.text-successSuccess text color
.text-dangerDanger text color
.text-warningWarning text color
.text-infoInfo text color
.text-lightLight text color
.text-darkDark text color
.text-whiteWhite text color
.borderBorder
.border-topTop border
.border-rightRight border
.border-bottomBottom border
.border-leftLeft border
.border-0Remove border
.border-primaryPrimary border color
.border-secondarySecondary border color
.border-successSuccess border color
.border-dangerDanger border color
.border-warningWarning border color
.border-infoInfo border color
.border-lightLight border color
.border-darkDark border color
.border-whiteWhite border color
.roundedRounded corners
.rounded-topTop rounded corners
.rounded-rightRight rounded corners
.rounded-bottomBottom rounded corners
.rounded-leftLeft rounded corners
.rounded-circleCircle shape
.rounded-0Remove rounded corners
.shadow-smSmall box shadow
.shadowMedium box shadow
.shadow-lgLarge box shadow
.shadow-noneRemove box shadow

Reference:

https://getbootstrap.com/docs/4.0/getting-started/introduction/