Placeholders
Create placeholders with the .placeholder
class and a grid column class (e.g., .col-6
) to set the width
. They can replace the text inside an element or be added as a modifier class to an existing component.
We apply additional styling to .btn
s via ::before
to ensure the height
is respected. You may extend this pattern for other situations as needed, or add a
within the element to reflect the height when actual text is rendered in its place.
<div class="card" aria-hidden="true">
<img src="../assets/images/gallery/16.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title placeholder-glow">
<span class="placeholder col-6"></span>
</h5>
<p class="card-text placeholder-glow">
<span class="placeholder col-7"></span>
<span class="placeholder col-4"></span>
<span class="placeholder col-4"></span>
<span class="placeholder col-6"></span>
<span class="placeholder col-8"></span>
</p>
<a href="#" tabindex="-1" class="btn btn-primary disabled placeholder col-6"></a>
</div>
</div>
Basic Example
Card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereWidth and Color
You can change the width
through grid column classes, width utilities, or inline styles.
By default, the placeholder
uses currentColor
. This can be overridden with a custom color or utility class.