Bootstrap class: .d-*-flex

<div class="d-flex bg-primary">d-flex</div>
<span class="d-sm-flex bg-primary">d-sm-flex</span>
<span class="d-md-flex bg-primary">d-md-flex</span>
<span class="d-lg-flex bg-primary">d-lg-flex</span>
<span class="d-xl-flex bg-primary">d-xl-flex</span>

Preview

d-flex
d-sm-flex d-md-flex d-lg-flex d-xl-flex

More in Bootstrap Display