2016-09-11 11:00:49 +00:00
|
|
|
---
|
2017-10-17 09:28:59 +00:00
|
|
|
title: Card
|
2024-03-21 16:11:54 +00:00
|
|
|
layout: docs
|
|
|
|
theme: library
|
2016-09-11 11:00:49 +00:00
|
|
|
doc-tab: components
|
|
|
|
doc-subtab: card
|
2018-04-09 12:18:46 +00:00
|
|
|
breadcrumb:
|
2024-03-21 16:11:54 +00:00
|
|
|
- home
|
|
|
|
- documentation
|
|
|
|
- components
|
|
|
|
- components-card
|
2018-04-09 12:18:46 +00:00
|
|
|
meta:
|
2018-04-09 13:15:31 +00:00
|
|
|
variables: true
|
|
|
|
colors: false
|
|
|
|
sizes: false
|
2016-09-11 11:00:49 +00:00
|
|
|
---
|
2016-10-30 17:35:39 +00:00
|
|
|
{% capture card_example %}
|
2016-09-11 11:00:49 +00:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-image">
|
|
|
|
<figure class="image is-4by3">
|
2024-03-21 16:11:54 +00:00
|
|
|
<img
|
|
|
|
src="{{site.url}}/assets/images/placeholders/1280x960.png"
|
|
|
|
alt="Placeholder image"
|
|
|
|
/>
|
2016-09-11 11:00:49 +00:00
|
|
|
</figure>
|
|
|
|
</div>
|
|
|
|
<div class="card-content">
|
|
|
|
<div class="media">
|
|
|
|
<div class="media-left">
|
2017-03-13 12:33:34 +00:00
|
|
|
<figure class="image is-48x48">
|
2024-03-21 16:11:54 +00:00
|
|
|
<img
|
|
|
|
src="{{site.url}}/assets/images/placeholders/96x96.png"
|
|
|
|
alt="Placeholder image"
|
|
|
|
/>
|
2016-09-11 11:00:49 +00:00
|
|
|
</figure>
|
|
|
|
</div>
|
|
|
|
<div class="media-content">
|
2016-12-23 12:20:58 +00:00
|
|
|
<p class="title is-4">John Smith</p>
|
2016-09-11 11:00:49 +00:00
|
|
|
<p class="subtitle is-6">@johnsmith</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content">
|
2024-03-21 16:11:54 +00:00
|
|
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec
|
|
|
|
iaculis mauris. <a>@bulmaio</a>. <a href="#">#css</a>
|
|
|
|
<a href="#">#responsive</a>
|
|
|
|
<br />
|
2017-09-09 10:33:25 +00:00
|
|
|
<time datetime="2016-1-1">11:09 PM - 1 Jan 2016</time>
|
2016-09-11 11:00:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-10-30 17:35:39 +00:00
|
|
|
{% endcapture %}
|
|
|
|
{% capture card_header_example %}
|
|
|
|
<div class="card">
|
2016-09-11 11:00:49 +00:00
|
|
|
<header class="card-header">
|
2024-03-21 16:11:54 +00:00
|
|
|
<p class="card-header-title">Component</p>
|
2021-01-27 23:30:42 +00:00
|
|
|
<button class="card-header-icon" aria-label="more options">
|
2016-10-30 17:35:39 +00:00
|
|
|
<span class="icon">
|
2018-01-10 16:30:23 +00:00
|
|
|
<i class="fas fa-angle-down" aria-hidden="true"></i>
|
2016-10-30 17:35:39 +00:00
|
|
|
</span>
|
2021-01-27 23:30:42 +00:00
|
|
|
</button>
|
2016-09-11 11:00:49 +00:00
|
|
|
</header>
|
|
|
|
<div class="card-content">
|
|
|
|
<div class="content">
|
2024-03-21 16:11:54 +00:00
|
|
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec
|
|
|
|
iaculis mauris.
|
2017-09-09 10:33:25 +00:00
|
|
|
<a href="#">@bulmaio</a>. <a href="#">#css</a> <a href="#">#responsive</a>
|
2024-03-21 16:11:54 +00:00
|
|
|
<br />
|
2017-09-09 10:33:25 +00:00
|
|
|
<time datetime="2016-1-1">11:09 PM - 1 Jan 2016</time>
|
2016-09-11 11:00:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<footer class="card-footer">
|
2017-09-09 10:33:25 +00:00
|
|
|
<a href="#" class="card-footer-item">Save</a>
|
|
|
|
<a href="#" class="card-footer-item">Edit</a>
|
|
|
|
<a href="#" class="card-footer-item">Delete</a>
|
2016-09-11 11:00:49 +00:00
|
|
|
</footer>
|
|
|
|
</div>
|
2016-10-30 17:35:39 +00:00
|
|
|
{% endcapture %}
|
2017-03-14 21:00:58 +00:00
|
|
|
{% capture card_title_example %}
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-content">
|
|
|
|
<p class="title">
|
2024-03-21 16:11:54 +00:00
|
|
|
“There are two hard things in computer science: cache invalidation, naming
|
|
|
|
things, and off-by-one errors.”
|
2017-03-14 21:00:58 +00:00
|
|
|
</p>
|
2024-03-21 16:11:54 +00:00
|
|
|
<p class="subtitle">Jeff Atwood</p>
|
2017-03-14 21:00:58 +00:00
|
|
|
</div>
|
|
|
|
<footer class="card-footer">
|
|
|
|
<p class="card-footer-item">
|
2017-03-14 22:25:22 +00:00
|
|
|
<span>
|
2024-03-21 16:11:54 +00:00
|
|
|
View on
|
|
|
|
<a href="https://twitter.com/codinghorror/status/506010907021828096"
|
|
|
|
>Twitter</a
|
|
|
|
>
|
2017-03-14 22:25:22 +00:00
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
<p class="card-footer-item">
|
2024-03-21 16:11:54 +00:00
|
|
|
<span> Share on <a href="#">Facebook</a> </span>
|
2017-03-14 21:00:58 +00:00
|
|
|
</p>
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
{% endcapture %}
|
2017-07-13 18:44:35 +00:00
|
|
|
|
2018-04-09 12:18:46 +00:00
|
|
|
<div class="content">
|
|
|
|
<p>The <strong>card</strong> component comprises several elements that you can mix and match:</p>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<code>card</code>: the main container
|
2017-07-13 18:44:35 +00:00
|
|
|
<ul>
|
|
|
|
<li>
|
2018-04-09 12:18:46 +00:00
|
|
|
<code>card-header</code>: a horizontal bar with a shadow
|
2017-07-13 18:44:35 +00:00
|
|
|
<ul>
|
2024-03-21 16:11:54 +00:00
|
|
|
<li><code>card-header-title</code>: a left-aligned bold text</li>
|
|
|
|
<li><code>card-header-icon</code>: a placeholder for an icon</li>
|
2018-04-09 12:18:46 +00:00
|
|
|
</ul>
|
|
|
|
</li>
|
2024-03-21 16:11:54 +00:00
|
|
|
<li><code>card-image</code>: a fullwidth container for a responsive image</li>
|
|
|
|
<li><code>card-content</code>: a multi-purpose container for <em>any</em> other element</li>
|
2018-04-09 12:18:46 +00:00
|
|
|
<li>
|
|
|
|
<code>card-footer</code>: a horizontal list of controls
|
|
|
|
<ul>
|
2024-03-21 16:11:54 +00:00
|
|
|
<li><code>card-footer-item</code>: a repeatable list item</li>
|
2017-07-13 18:44:35 +00:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2018-04-09 12:18:46 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2017-09-18 22:36:41 +00:00
|
|
|
|
2018-04-09 12:18:46 +00:00
|
|
|
<div class="content">
|
2024-03-21 16:11:54 +00:00
|
|
|
<p>You can center the <code>card-header-title</code> by appending the <code>is-centered</code> modifier.</p>
|
2018-04-09 12:18:46 +00:00
|
|
|
</div>
|
2017-07-13 18:44:35 +00:00
|
|
|
|
2024-03-21 16:11:54 +00:00
|
|
|
{% include docs/elements/snippet.html content=card_example size="1-2" %}
|
2017-07-13 18:44:35 +00:00
|
|
|
|
2021-01-27 23:30:42 +00:00
|
|
|
<!-- -->
|
2024-03-21 16:11:54 +00:00
|
|
|
{% include docs/elements/anchor.html name="Card parts" %}
|
2021-01-27 23:30:42 +00:00
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
<p>The <code>card-header</code> can have a <strong>title</strong> and a Bulma <code>icon</code>:</p>
|
2018-04-09 12:18:46 +00:00
|
|
|
</div>
|
2017-07-13 18:44:35 +00:00
|
|
|
|
2021-01-27 23:30:42 +00:00
|
|
|
{% capture card_image %}
|
|
|
|
<div class="card">
|
|
|
|
<header class="card-header">
|
2024-03-21 16:11:54 +00:00
|
|
|
<p class="card-header-title">Card header</p>
|
2021-01-27 23:30:42 +00:00
|
|
|
<button class="card-header-icon" aria-label="more options">
|
|
|
|
<span class="icon">
|
|
|
|
<i class="fas fa-angle-down" aria-hidden="true"></i>
|
|
|
|
</span>
|
|
|
|
</button>
|
|
|
|
</header>
|
|
|
|
</div>
|
|
|
|
{% endcapture %}
|
2024-03-21 16:11:54 +00:00
|
|
|
{%
|
|
|
|
include docs/elements/snippet.html content=card_image
|
|
|
|
size="1-2"
|
|
|
|
%}
|
2021-01-27 23:30:42 +00:00
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
<p>The <code>card-image</code> is a container for a Bulma <code>image</code> element:</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% capture card_image %}
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-image">
|
|
|
|
<figure class="image is-4by3">
|
2024-03-21 16:11:54 +00:00
|
|
|
<img
|
|
|
|
src="{{site.url}}/assets/images/placeholders/1280x960.png"
|
|
|
|
alt="Placeholder image"
|
|
|
|
/>
|
2021-01-27 23:30:42 +00:00
|
|
|
</figure>
|
2018-04-09 12:18:46 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-01-27 23:30:42 +00:00
|
|
|
{% endcapture %}
|
2024-03-21 16:11:54 +00:00
|
|
|
{%
|
|
|
|
include docs/elements/snippet.html content=card_image
|
|
|
|
size="1-2"
|
|
|
|
%}
|
2017-07-28 21:57:51 +00:00
|
|
|
|
2021-01-27 23:30:42 +00:00
|
|
|
<div class="content">
|
|
|
|
<p>The <code>card-content</code> is the main part, ideal for <strong>text content</strong>, thanks to its padding:</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% capture card_image %}
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-content">
|
|
|
|
<div class="content">
|
2024-03-21 16:11:54 +00:00
|
|
|
Lorem ipsum leo risus, porta ac consectetur ac, vestibulum at eros. Donec
|
|
|
|
id elit non mi porta gravida at eget metus. Cum sociis natoque penatibus
|
|
|
|
et magnis dis parturient montes, nascetur ridiculus mus. Cras mattis
|
|
|
|
consectetur purus sit amet fermentum.
|
2021-01-27 23:30:42 +00:00
|
|
|
</div>
|
2016-09-11 11:00:49 +00:00
|
|
|
</div>
|
2018-04-09 12:18:46 +00:00
|
|
|
</div>
|
2021-01-27 23:30:42 +00:00
|
|
|
{% endcapture %}
|
2024-03-21 16:11:54 +00:00
|
|
|
{%
|
|
|
|
include docs/elements/snippet.html content=card_image
|
|
|
|
size="1-2"
|
|
|
|
%}
|
2021-01-27 23:30:42 +00:00
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
<p>The <code>card-footer</code> acts as a list of for several <code>card-footer-item</code> elements:</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% capture card_footer %}
|
|
|
|
<div class="card">
|
|
|
|
<footer class="card-footer">
|
|
|
|
<a href="#" class="card-footer-item">Save</a>
|
|
|
|
<a href="#" class="card-footer-item">Edit</a>
|
|
|
|
<a href="#" class="card-footer-item">Delete</a>
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
{% endcapture %}
|
2024-03-21 16:11:54 +00:00
|
|
|
{%
|
|
|
|
include docs/elements/snippet.html content=card_footer
|
|
|
|
size="1-2"
|
|
|
|
%}
|
|
|
|
{% include docs/elements/anchor.html name="Examples" %}
|
|
|
|
{% include docs/elements/snippet.html content=card_header_example size="1-2" %}
|
|
|
|
{% include docs/elements/snippet.html content=card_title_example size="1-2" %}
|
2021-01-27 23:30:42 +00:00
|
|
|
|