Semantic UI Placeholder
Semantic UI provides a convenient way to create responsive and customizable content loaders using the Placeholder component. Placeholders are often used to give users an indication that content is loading or to simulate the layout of content before it is loaded.
Syntax
<div class="ui placeholder">
<!-- Placeholder elements go here -->
</div>
Example
<div class="ui placeholder">
<div class="image"></div>
<div class="header"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
</div>
Output
Explanation
- The
ui placeholder
class is applied to a container element. - Inside the container, various placeholder elements such as
image
,header
, andline
are used to create a visually appealing loading layout.
Use
Use Semantic UI Placeholder to enhance user experience by displaying loading animations or placeholders for content that is yet to be loaded.
Important Points
- Customize the appearance and layout of placeholders by combining different placeholder elements.
- You can animate the loading effect by using the
animated
class.
<div class="ui placeholder animated">
<!-- Placeholder elements with animation -->
</div>
Summary
Semantic UI Placeholder provides a simple and flexible way to create loading placeholders for your content. It helps improve user experience by giving a visual indication that content is loading or by providing a temporary layout structure before actual content is available.