Display

Display

The utility d-* sets the display property.

UtilityDescriptionExample
d-nonenone
This is none text.
d-inlineinline
This is inline text.
d-inline-blockinline-block
This is inline-block text.
d-blockblock
This is block text.
d-inline-flexinline-flex
This is inline-flex text.
d-flexflex
This is flex text.
d-gridgrid
This is grid text.
d-tabletable
This is table text.
d-table-rowtable-row
This is table-row text.
d-table-celltable-cell
This is table-cell text.
<div className="d-none">This is none text.</div>
<div className="d-inline">This is inline text.</div>
<div className="d-inline">This is inline-block text.</div>
<div className="d-block">This is block text.</div>
<div className="d-inline-flex">This is inline-flex text.</div>
<div className="d-flex">This is flex text.</div>
<div className="d-grid">This is grid text.</div>
<div className="d-table">This is table text.</div>
<div className="d-table-row">This is table-row text.</div>
<div className="d-table-cell">This is table-cell text.</div>

Sm

The utility d-sm-* sets the display property for screen sizes 576px(sm) and up.

UtilityDescriptionExample
d-sm-noneHidden on min-width: 576px (sm)
This is visible between 0 and 576px.
d-none d-sm-inlineHidden between 0 and 575px and inline on min-width: 576px (sm)
This is inline text.
d-none d-sm-inline-blockHidden between 0 and 575px and inline-block on min-width: 576px (sm)
This is inline-block text.
d-none d-sm-blockHidden between 0 and 575px and block on min-width: 576px (sm)
This is block text.
d-none d-sm-inline-flexHidden between 0 and 575px and inline-flex on min-width: 576px (sm)
This is inline-flex text.
d-none d-sm-flexHidden between 0 and 575px and flex on min-width: 576px (sm)
This is flex text.
d-none d-sm-gridHidden between 0 and 575px and grid on min-width: 576px (sm)
This is grid text.
d-none d-sm-tableHidden between 0 and 575px and table on min-width: 576px (sm)
This is table text.
d-none d-sm-table-rowHidden between 0 and 575px and table-row on min-width: 576px (sm)
This is table-row text.
d-none d-sm-table-cellHidden between 0 and 575px and table-cell on min-width: 576px (sm)
This is table-cell text.
<div className="d-sm-none">This is none text.</div>
<div className="d-none d-sm-inline">This is inline text.</div>
<div className="d-none d-sm-inline">This is inline-block text.</div>
<div className="d-none d-sm-block">This is block text.</div>
<div className="d-none d-sm-inline-flex">This is inline-flex text.</div>
<div className="d-none d-sm-flex">This is flex text.</div>
<div className="d-none d-sm-grid">This is grid text.</div>
<div className="d-none d-sm-table">This is table text.</div>
<div className="d-none d-sm-table-row">This is table-row text.</div>
<div className="d-none d-sm-table-cell">This is table-cell text.</div>

Md

The utility d-md-* sets the display property for screen sizes 768px(md) and up.

UtilityDescriptionExample
d-md-noneHidden on min-width 768px (md)
This is should be hidden on min-width 768px.
d-none d-md-inlineHidden between 0 and 767px and inline on min-width: 768px (md)
This is inline text.
d-none d-md-inline-blockHidden between 0 and 767px and inline-block on min-width: 768px (md)
This is inline-block text.
d-none d-md-blockHidden between 0 and 767px and block on min-width: 768px (md)
This is block text.
d-none d-md-inline-flexHidden between 0 and 767px and inline-flex on min-width: 768px (md)
This is inline-flex text.
d-none d-md-flexHidden between 0 and 767px and flex on min-width: 768px (md)
This is flex text.
d-none d-md-gridHidden between 0 and 767px and grid on min-width: 768px (md)
This is grid text.
d-none d-md-tableHidden between 0 and 767px and table on min-width: 768px (md)
This is table text.
d-none d-md-table-rowHidden between 0 and 767px and table-row on min-width: 768px (md)
This is table-row text.
d-none d-md-table-cellHidden between 0 and 767px and table-cell on min-width: 768px (md)
This is table-cell text.
<div className="d-md-none">This is should be hidden on min-width 768px.</div>
<div className="d-none d-md-inline">This is inline text.</div>
<div className="d-none d-md-inline">This is inline-block text.</div>
<div className="d-none d-md-block">This is block text.</div>
<div className="d-none d-md-inline-flex">This is inline-flex text.</div>
<div className="d-none d-md-flex">This is flex text.</div>
<div className="d-none d-md-grid">This is grid text.</div>
<div className="d-none d-md-table">This is table text.</div>
<div className="d-none d-md-table-row">This is table-row text.</div>
<div className="d-none d-md-table-cell">This is table-cell text.</div>

Lg

The utility d-lg-* sets the display property for screen sizes 992px(lg) and up.

UtilityDescriptionExample
d-lg-noneHidden on min-width: 992px (lg)
This is none text.
d-none d-lg-inlineHidden between 0 and 991px and inline on min-width: 992px (lg)
This is inline text.
d-none d-lg-inline-blockHidden between 0 and 991px and inline-block on min-width: 992px (lg)
This is inline-block text.
d-none d-lg-blockHidden between 0 and 991px and block on min-width: 992px (lg)
This is block text.
d-none d-lg-inline-flexHidden between 0 and 991px and inline-flex on min-width: 992px (lg)
This is inline-flex text.
d-none d-lg-flexHidden between 0 and 991px and flex on min-width: 992px (lg)
This is flex text.
d-none d-lg-gridHidden between 0 and 991px and grid on min-width: 992px (lg)
This is grid text.
d-none d-lg-tableHidden between 0 and 991px and table on min-width: 992px (lg)
This is table text.
d-none d-lg-table-rowHidden between 0 and 991px and table-row on min-width: 992px (lg)
This is table-row text.
d-none d-lg-table-cellHidden between 0 and 991px and table-cell on min-width: 992px (lg)
This is table-cell text.
<div className="d-lg-none">This is none text.</div>
<div className="d-none d-lg-inline">This is inline text.</div>
<div className="d-none d-lg-inline">This is inline-block text.</div>
<div className="d-none d-lg-block">This is block text.</div>
<div className="d-none d-lg-inline-flex">This is inline-flex text.</div>
<div className="d-none d-lg-flex">This is flex text.</div>
<div className="d-none d-lg-grid">This is grid text.</div>
<div className="d-none d-lg-table">This is table text.</div>
<div className="d-none d-lg-table-row">This is table-row text.</div>
<div className="d-none d-lg-table-cell">This is table-cell text.</div>

Xl

The utility d-xl-* sets the display property for screen sizes 1280px(xl) and up.

UtilityDescriptionExample
d-xl-noneHidden on min-width: 1280px (xl)
This is none text.
d-none d-xl-inlineHidden between 0 and 1279px and inline on min-width: 1280px (xl)
This is inline text.
d-none d-xl-inline-blockHidden between 0 and 1279px and inline-block on min-width: 1280px (xl)
This is inline-block text.
d-none d-xl-blockHidden between 0 and 1279px and block on min-width: 1280px (xl)
This is block text.
d-none d-xl-inline-flexHidden between 0 and 1279px and inline-flex on min-width: 1280px (xl)
This is inline-flex text.
d-none d-xl-flexHidden between 0 and 1279px and flex on min-width: 1280px (xl)
This is flex text.
d-none d-xl-gridHidden between 0 and 1279px and grid on min-width: 1280px (xl)
This is grid text.
d-none d-xl-tableHidden between 0 and 1279px and table on min-width: 1280px (xl)
This is table text.
d-none d-xl-table-rowHidden between 0 and 1279px and table-row on min-width: 1280px (xl)
This is table-row text.
d-none d-xl-table-cellHidden between 0 and 1279px and table-cell on min-width: 1280px (xl)
This is table-cell text.
<div className="d-xl-none">This is none text.</div>
<div className="d-none d-xl-inline">This is inline text.</div>
<div className="d-none d-xl-inline">This is inline-block text.</div>
<div className="d-none d-xl-block">This is block text.</div>
<div className="d-none d-xl-inline-flex">This is inline-flex text.</div>
<div className="d-none d-xl-flex">This is flex text.</div>
<div className="d-none d-xl-grid">This is grid text.</div>
<div className="d-none d-xl-table">This is table text.</div>
<div className="d-none d-xl-table-row">This is table-row text.</div>
<div className="d-none d-xl-table-cell">This is table-cell text.</div>

Hiding Elements

Hide elements for specific screen size ranges by combining d-{breakpoint}-none with d-{breakpoint}-* utilities.

UtilityScreen SizeDescriptionExample
d-none-Hidden everywhere
d-none d-sm-inline-flex0px - 575pxHidden only on xs
d-sm-none d-md-inline-flex576px - 767pxHidden only on sm
d-md-none d-lg-inline-flex768px - 991pxHidden only on md
d-lg-none d-xl-inline-flex992px - 1279pxHidden only on lg
d-xl-none1280px+Hidden only on xl
d-inline-flex d-sm-none0px - 575pxVisible only on xs
d-none d-sm-inline-flex d-md-none575px - 767pxVisible only on sm
d-none d-md-inline-flex d-lg-none768px - 991pxVisible only on md
d-none d-lg-inline-flex d-xl-none992px - 1279pxVisible only on lg
d-none d-xl-inline-flex1280pxVisible only on xl