--- title: Skeletons in Bulma layout: docs markdown: true theme: features doc-tab: features doc-subtab: skeletons breadcrumb: - home - documentation - features - features-skeletons --- {% capture title_is_skeleton %}

Title

{% endcapture %} {% capture title_has_skeleton %}

Title

{% endcapture %} {% capture subtitle_is_skeleton %}

Subtitle

{% endcapture %} {% capture subtitle_has_skeleton %}

Subtitle

{% endcapture %} {% capture title_and_subtitle_is_skeleton %}

Title

Subtitle

{% endcapture %} {% capture title_and_subtitle_has_skeleton %}

Title

Subtitle

{% endcapture %} {% capture skeleton_block %}
{% endcapture %} {% capture skeleton_block_with_text %}
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula ut id elit.
{% endcapture %} {% capture skeleton_lines %}
{% endcapture %} {% capture markdown %} A skeleton loader is a loading state that acts as a **placeholder** for content in an interface. Bulma v1 ships with 2 skeleton elements, and skeleton variants for most Bulma components. All skeleton loaders share these CSS variables: ```css :root { --bulma-skeleton-background: var(--bulma-border); --bulma-skeleton-radius: var(--bulma-radius-small); --bulma-skeleton-block-min-height: 4.5em; --bulma-skeleton-lines-gap: 0.75em; --bulma-skeleton-line-height: 0.75em; } ``` {% endcapture %} {% include markdown.html content=markdown %} {% include docs/elements/anchor.html name="Skeleton Block" %} {% capture markdown %} The skeleton block is a simple block element with a pulsating background. It has a minimum height of `4.5em`. {% endcapture %} {% include markdown.html content=markdown %} {% include docs/elements/snippet.html content=skeleton_block %} {% capture markdown %} If you insert text inside this block, you can make its height responsive: {% endcapture %} {% include markdown.html content=markdown %} {% include docs/elements/snippet.html content=skeleton_block_with_text %} {% include docs/elements/anchor.html name="Skeleton Lines" %} {% capture markdown %} The skeleton lines element is a loading element which resembles a **paragraph**. Each `
` will render as a separate loading line. {% endcapture %} {% include markdown.html content=markdown %} {% include docs/elements/snippet.html content=skeleton_lines %} {% include docs/elements/anchor.html name="Bulma components with skeletons" %} {% capture markdown %} Most Bulma elements and components have a skeleton variant, which can be enabled by adding either the `is-skeleton` or `has-skeleton` modifier. {% endcapture %} {% include markdown.html content=markdown %} {% include docs/elements/anchor-bis.html name="Button" %} {% capture button_skeleton %}
{% endcapture %} {% include docs/elements/snippet.html content=button_skeleton %} {% include docs/elements/anchor-bis.html name="Icon" %} {% capture icon_skeleton %} {% endcapture %} {% include docs/elements/snippet.html content=icon_skeleton %} {% include docs/elements/anchor-bis.html name="Image" %} {% capture image_skeleton %}
Placeholder
Placeholder
Placeholder
Placeholder
{% endcapture %} {% include docs/elements/snippet.html content=image_skeleton %} {% include docs/elements/anchor-bis.html name="Media Object" %} {% capture media_skeleton %}

Placeholder image

John Smith @johnsmith 31m
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ornare magna eros, eu pellentesque tortor sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit vestibulum ut. Maecenas non massa sem. Etiam finibus odio quis feugiat facilisis.

{% endcapture %} {% capture media_skeleton_bis %}

Placeholder image

{% endcapture %} {% include docs/elements/snippet.html content=media_skeleton %} {% include docs/elements/snippet.html content=media_skeleton_bis %} {% include docs/elements/anchor-bis.html name="Notification" %} {% capture notification_skeleton %}
Curabitur blandit tempus porttitor. Etiam porta sem malesuada magna mollis euismod. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
{% endcapture %} {% include docs/elements/snippet.html content=notification_skeleton %} {% include docs/elements/anchor-bis.html name="Tag" %} {% capture tag_skeleton %} Tag{% for color in site.data.colors.justColors %} {{ color | capitalize }}{% endfor %} {% endcapture %} {% include docs/elements/snippet.html content=tag_skeleton %} {% include docs/elements/anchor-bis.html name="Title and Subtitle" %} The `.title` and `.subtitle` elements have both an `is-skeleton` and `has-skeleton` variant: * `is-skeleton` will turn the whole block into a loading skeleton * `has-skeleton` will turn only a small part of its content into a loading skeleton, to simulate loading only the inner text rather than the whole block {% include docs/elements/snippet.html content=title_is_skeleton %} {% include docs/elements/snippet.html content=title_has_skeleton %} {% include docs/elements/snippet.html content=subtitle_is_skeleton %} {% include docs/elements/snippet.html content=subtitle_has_skeleton %} {% include docs/elements/snippet.html content=title_and_subtitle_is_skeleton %} {% include docs/elements/snippet.html content=title_and_subtitle_has_skeleton %} {% include docs/elements/anchor-bis.html name="Form Controls" %} {% capture input_skeleton %} {% endcapture %} {% capture textarea_skeleton %} {% endcapture %} {% include docs/elements/snippet.html content=input_skeleton %} {% include docs/elements/snippet.html content=textarea_skeleton %}