bulma/docs/documentation/components/message.html

209 lines
8.3 KiB
HTML
Raw Normal View History

---
title: Message
2024-03-21 16:11:54 +00:00
layout: docs
theme: library
doc-tab: components
doc-subtab: message
2018-04-09 12:18:46 +00:00
breadcrumb:
2024-03-21 16:11:54 +00:00
- home
- documentation
- components
- components-message
2018-04-09 13:15:31 +00:00
meta:
colors: true
sizes: true
variables: true
---
2016-10-30 19:20:51 +00:00
{% capture message_example %}
<article class="message">
<div class="message-header">
2016-10-30 19:20:51 +00:00
<p>Hello World</p>
<button class="delete" aria-label="delete"></button>
</div>
<div class="message-body">
2024-03-21 16:11:54 +00:00
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut, porta nec
nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus
diam, et dictum <a>felis venenatis</a> efficitur. Aenean ac
<em>eleifend lacus</em>, in mollis lectus. Donec sodales, arcu et
sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi magna a
neque. Donec dui urna, vehicula et sem eget, facilisis sodales sem.
2016-10-30 19:20:51 +00:00
</div>
</article>
2024-03-21 16:11:54 +00:00
{% endcapture %} {% capture message_dark_example %}
2016-10-30 19:20:51 +00:00
<article class="message is-dark">
<div class="message-header">
<p>Dark</p>
<button class="delete" aria-label="delete"></button>
2016-10-30 19:20:51 +00:00
</div>
<div class="message-body">
2024-03-21 16:11:54 +00:00
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut, porta nec
nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus
diam, et dictum <a>felis venenatis</a> efficitur. Aenean ac
<em>eleifend lacus</em>, in mollis lectus. Donec sodales, arcu et
sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi magna a
neque. Donec dui urna, vehicula et sem eget, facilisis sodales sem.
</div>
</article>
2024-03-21 16:11:54 +00:00
{% endcapture %} {% capture message_small %}
2017-07-28 22:45:40 +00:00
<article class="message is-small">
<div class="message-header">
<p>Small message</p>
<button class="delete is-small" aria-label="delete"></button>
2017-07-28 22:45:40 +00:00
</div>
<div class="message-body">
2024-03-21 16:11:54 +00:00
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut, porta nec
nulla.Nullam gravida purus diam, et dictum <a>felis venenatis</a> efficitur.
Aenean ac <em>eleifend lacus</em>, in mollis lectus.
2017-07-28 22:45:40 +00:00
</div>
</article>
2024-03-21 16:11:54 +00:00
{% endcapture %} {% capture message_normal %}
2017-07-28 22:45:40 +00:00
<article class="message">
<div class="message-header">
<p>Normal message</p>
<button class="delete" aria-label="delete"></button>
2017-07-28 22:45:40 +00:00
</div>
<div class="message-body">
2024-03-21 16:11:54 +00:00
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut, porta nec
nulla.Nullam gravida purus diam, et dictum <a>felis venenatis</a> efficitur.
Aenean ac <em>eleifend lacus</em>, in mollis lectus.
2017-07-28 22:45:40 +00:00
</div>
</article>
2024-03-21 16:11:54 +00:00
{% endcapture %} {% capture message_medium %}
2017-07-28 22:45:40 +00:00
<article class="message is-medium">
<div class="message-header">
<p>Medium message</p>
<button class="delete is-medium" aria-label="delete"></button>
2017-07-28 22:45:40 +00:00
</div>
<div class="message-body">
2024-03-21 16:11:54 +00:00
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut, porta nec
nulla.Nullam gravida purus diam, et dictum <a>felis venenatis</a> efficitur.
Aenean ac <em>eleifend lacus</em>, in mollis lectus.
2017-07-28 22:45:40 +00:00
</div>
</article>
2024-03-21 16:11:54 +00:00
{% endcapture %} {% capture message_large %}
2017-07-28 22:45:40 +00:00
<article class="message is-large">
<div class="message-header">
<p>Large message</p>
<button class="delete is-large" aria-label="delete"></button>
2017-07-28 22:45:40 +00:00
</div>
<div class="message-body">
2024-03-21 16:11:54 +00:00
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut, porta nec
nulla.Nullam gravida purus diam, et dictum <a>felis venenatis</a> efficitur.
Aenean ac <em>eleifend lacus</em>, in mollis lectus.
2017-07-28 22:45:40 +00:00
</div>
</article>
2024-03-21 16:11:54 +00:00
{% endcapture %} {% capture message_body_example %}
<article class="message">
<div class="message-body">
2024-03-21 16:11:54 +00:00
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut, porta nec
nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus
diam, et dictum <a>felis venenatis</a> efficitur. Aenean ac
<em>eleifend lacus</em>, in mollis lectus. Donec sodales, arcu et
sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi magna a
neque. Donec dui urna, vehicula et sem eget, facilisis sodales sem.
</div>
</article>
2024-03-21 16:11:54 +00:00
{% endcapture %} {% capture message_body_dark_example %}
2016-10-30 19:20:51 +00:00
<article class="message is-dark">
<div class="message-body">
2024-03-21 16:11:54 +00:00
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut, porta nec
nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus
diam, et dictum <a>felis venenatis</a> efficitur. Aenean ac
<em>eleifend lacus</em>, in mollis lectus. Donec sodales, arcu et
sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi magna a
neque. Donec dui urna, vehicula et sem eget, facilisis sodales sem.
2016-10-30 19:20:51 +00:00
</div>
</article>
{% endcapture %}
2017-07-28 22:27:59 +00:00
2019-10-13 18:20:44 +00:00
<div class="content">
2024-03-21 16:11:54 +00:00
<p>The Bulma <code>message</code> is a multi-part component:</p>
2019-10-13 18:20:44 +00:00
<ul>
2024-03-21 16:11:54 +00:00
<li>the <code>message</code> container</li>
2019-10-13 18:20:44 +00:00
<li>
2024-03-21 16:11:54 +00:00
the optional <code>message-header</code> that can hold a title and a
<code>delete</code> element
2019-10-13 18:20:44 +00:00
</li>
2024-03-21 16:11:54 +00:00
<li>the <code>message-body</code> for the longer body of the message</li>
2019-10-13 18:20:44 +00:00
</ul>
</div>
2024-03-21 16:11:54 +00:00
{% include docs/elements/snippet.html content=message_example %} {% include
docs/elements/anchor.html name="Colors" %}
2017-07-28 22:27:59 +00:00
2019-10-13 18:20:44 +00:00
<div class="content">
<p>
2024-03-21 16:11:54 +00:00
The message component is available in all the
<strong>different colors</strong> defined by the
<a href="{{ site.data.links.by_id.customize-variables.path }}"
><code>$colors</code> Sass map</a
>.
2019-10-13 18:20:44 +00:00
</p>
</div>
2024-03-21 16:11:54 +00:00
{% include docs/elements/snippet.html content=message_dark_example more=true %}
{% for color in site.data.colors.justColors %} {% capture foobar %}
<article class="message is-{{ color }}">
<div class="message-header">
<p>{{ color | capitalize }}</p>
<button class="delete" aria-label="delete"></button>
</div>
<div class="message-body">
2024-03-21 16:11:54 +00:00
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut, porta nec
nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus
diam, et dictum <a>felis venenatis</a> efficitur. Aenean ac
<em>eleifend lacus</em>, in mollis lectus. Donec sodales, arcu et
sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi magna a
neque. Donec dui urna, vehicula et sem eget, facilisis sodales sem.
</div>
</article>
2024-03-21 16:11:54 +00:00
{% endcapture %} {% include docs/elements/snippet.html content=foobar more=true
%} {% endfor %} {% include docs/elements/anchor.html name="Message body only" %}
2017-07-28 22:27:59 +00:00
2018-04-09 12:18:46 +00:00
<div class="content">
2019-10-13 18:20:44 +00:00
<p>
2024-03-21 16:11:54 +00:00
You can remove the <code>message-header</code> if you don't need it, which
will add a left border to the <code>message-body</code>:
2019-10-13 18:20:44 +00:00
</p>
2018-04-09 12:18:46 +00:00
</div>
2017-07-28 22:27:59 +00:00
2024-03-21 16:11:54 +00:00
{% include docs/elements/snippet.html content=message_body_example %} {% include
docs/elements/snippet.html content=message_body_dark_example %} {% for color in
site.data.colors.justColors %} {% capture foobar %}
<article class="message is-{{ color }}">
<div class="message-body">
2024-03-21 16:11:54 +00:00
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut, porta nec
nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus
diam, et dictum <a>felis venenatis</a> efficitur. Aenean ac
<em>eleifend lacus</em>, in mollis lectus. Donec sodales, arcu et
sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi magna a
neque. Donec dui urna, vehicula et sem eget, facilisis sodales sem.
</div>
</article>
2024-03-21 16:11:54 +00:00
{% endcapture %} {% include docs/elements/snippet.html content=foobar %} {%
endfor %} {% include docs/elements/anchor.html name="Sizes" %}
2017-07-28 22:45:40 +00:00
2019-10-13 18:20:44 +00:00
<div class="content">
<p>
2024-03-21 16:11:54 +00:00
You can add one of <strong>3 size modifiers</strong> to the
<code>message</code> component:
2019-10-13 18:20:44 +00:00
</p>
</div>
2024-03-21 16:11:54 +00:00
{% include docs/elements/snippet.html content=message_small %} {% include
docs/elements/snippet.html content=message_normal %} {% include
docs/elements/snippet.html content=message_medium %} {% include
docs/elements/snippet.html content=message_large %} {% include
docs/components/variables.html type='component' %}