mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-14 11:14:24 +00:00
460 lines
12 KiB
HTML
460 lines
12 KiB
HTML
---
|
|
layout: documentation
|
|
doc-tab: components
|
|
doc-subtab: tabs
|
|
variables:
|
|
- name: $tabs-border-bottom-color
|
|
value: $border
|
|
- name: $tabs-border-bottom-style
|
|
value: solid
|
|
- name: $tabs-border-bottom-width
|
|
value: 1px
|
|
- name: $tabs-link-color
|
|
value: $text
|
|
- name: $tabs-link-hover-border-bottom-color
|
|
value: $text-strong
|
|
- name: $tabs-link-hover-color
|
|
value: $text-strong
|
|
- name: $tabs-link-active-border-bottom-color
|
|
value: $primary
|
|
- name: $tabs-link-active-color
|
|
value: $primary
|
|
- name: $tabs-link-padding
|
|
value: 0.5em 1em
|
|
- name: $tabs-boxed-link-radius
|
|
value: $radius
|
|
- name: $tabs-boxed-link-hover-background-color
|
|
value: $background
|
|
- name: $tabs-boxed-link-hover-border-bottom-color
|
|
value: $border
|
|
- name: $tabs-boxed-link-active-background-color
|
|
value: $white
|
|
- name: $tabs-boxed-link-active-border-color
|
|
value: $border
|
|
- name: $tabs-boxed-link-active-border-bottom-color
|
|
value: transparent
|
|
- name: $tabs-toggle-link-border-color
|
|
value: $border
|
|
- name: $tabs-toggle-link-border-style
|
|
value: solid
|
|
- name: $tabs-toggle-link-border-width
|
|
value: 1px
|
|
- name: $tabs-toggle-link-hover-background-color
|
|
value: $background
|
|
- name: $tabs-toggle-link-hover-border-color
|
|
value: $border-hover
|
|
- name: $tabs-toggle-link-radius
|
|
value: $radius
|
|
- name: $tabs-toggle-link-active-background-color
|
|
value: $primary
|
|
- name: $tabs-toggle-link-active-border-color
|
|
value: $primary
|
|
- name: $tabs-toggle-link-active-color
|
|
value: $primary-invert
|
|
---
|
|
|
|
{% capture tabs_example %}
|
|
<div class="tabs">
|
|
<ul>
|
|
<li class="is-active"><a>Pictures</a></li>
|
|
<li><a>Music</a></li>
|
|
<li><a>Videos</a></li>
|
|
<li><a>Documents</a></li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture tabs_centered_example %}
|
|
<div class="tabs is-centered">
|
|
<ul>
|
|
<li class="is-active"><a>Pictures</a></li>
|
|
<li><a>Music</a></li>
|
|
<li><a>Videos</a></li>
|
|
<li><a>Documents</a></li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture tabs_right_example %}
|
|
<div class="tabs is-right">
|
|
<ul>
|
|
<li class="is-active"><a>Pictures</a></li>
|
|
<li><a>Music</a></li>
|
|
<li><a>Videos</a></li>
|
|
<li><a>Documents</a></li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture tabs_icons_example %}
|
|
<div class="tabs is-centered">
|
|
<ul>
|
|
<li class="is-active">
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-image"></i></span>
|
|
<span>Pictures</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-music"></i></span>
|
|
<span>Music</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-film"></i></span>
|
|
<span>Videos</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-file-text-o"></i></span>
|
|
<span>Documents</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture tabs_small_example %}
|
|
<div class="tabs is-small">
|
|
<ul>
|
|
<li class="is-active"><a>Pictures</a></li>
|
|
<li><a>Music</a></li>
|
|
<li><a>Videos</a></li>
|
|
<li><a>Documents</a></li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture tabs_medium_example %}
|
|
<div class="tabs is-medium">
|
|
<ul>
|
|
<li class="is-active"><a>Pictures</a></li>
|
|
<li><a>Music</a></li>
|
|
<li><a>Videos</a></li>
|
|
<li><a>Documents</a></li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture tabs_large_example %}
|
|
<div class="tabs is-large">
|
|
<ul>
|
|
<li class="is-active"><a>Pictures</a></li>
|
|
<li><a>Music</a></li>
|
|
<li><a>Videos</a></li>
|
|
<li><a>Documents</a></li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture tabs_boxed_example %}
|
|
<div class="tabs is-boxed">
|
|
<ul>
|
|
<li class="is-active">
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-image"></i></span>
|
|
<span>Pictures</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-music"></i></span>
|
|
<span>Music</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-film"></i></span>
|
|
<span>Videos</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-file-text-o"></i></span>
|
|
<span>Documents</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture tabs_toggle_example %}
|
|
<div class="tabs is-toggle">
|
|
<ul>
|
|
<li class="is-active">
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-image"></i></span>
|
|
<span>Pictures</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-music"></i></span>
|
|
<span>Music</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-film"></i></span>
|
|
<span>Videos</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-file-text-o"></i></span>
|
|
<span>Documents</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture tabs_fullwidth_example %}
|
|
<div class="tabs is-fullwidth">
|
|
<ul>
|
|
<li>
|
|
<a>
|
|
<span class="icon"><i class="fa fa-angle-left"></i></span>
|
|
<span>Left</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon"><i class="fa fa-angle-up"></i></span>
|
|
<span>Up</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span>Right</span>
|
|
<span class="icon"><i class="fa fa-angle-right"></i></span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture tabs_centered_boxed_example %}
|
|
<div class="tabs is-centered is-boxed">
|
|
<ul>
|
|
<li class="is-active">
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-image"></i></span>
|
|
<span>Pictures</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-music"></i></span>
|
|
<span>Music</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-film"></i></span>
|
|
<span>Videos</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-file-text-o"></i></span>
|
|
<span>Documents</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture tabs_toggle_fullwidth_example %}
|
|
<div class="tabs is-toggle is-fullwidth">
|
|
<ul>
|
|
<li class="is-active">
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-image"></i></span>
|
|
<span>Pictures</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-music"></i></span>
|
|
<span>Music</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-film"></i></span>
|
|
<span>Videos</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-file-text-o"></i></span>
|
|
<span>Documents</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture tabs_centered_boxed_medium_example %}
|
|
<div class="tabs is-centered is-boxed is-medium">
|
|
<ul>
|
|
<li class="is-active">
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-image"></i></span>
|
|
<span>Pictures</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-music"></i></span>
|
|
<span>Music</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-film"></i></span>
|
|
<span>Videos</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon is-small"><i class="fa fa-file-text-o"></i></span>
|
|
<span>Documents</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture tabs_toggle_fullwidth_large_example %}
|
|
<div class="tabs is-toggle is-fullwidth is-large">
|
|
<ul>
|
|
<li class="is-active">
|
|
<a>
|
|
<span class="icon"><i class="fa fa-image"></i></span>
|
|
<span>Pictures</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon"><i class="fa fa-music"></i></span>
|
|
<span>Music</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon"><i class="fa fa-film"></i></span>
|
|
<span>Videos</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a>
|
|
<span class="icon"><i class="fa fa-file-text-o"></i></span>
|
|
<span>Documents</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% include subnav-components.html %}
|
|
|
|
<section class="section">
|
|
<div class="container">
|
|
<h1 class="title">Tabs</h1>
|
|
<h2 class="subtitle">Simple responsive horizontal navigation <strong>tabs</strong>, with different styles</h2>
|
|
{%
|
|
include meta.html
|
|
since="0.4.4"
|
|
colors=false
|
|
sizes=true
|
|
variables=true
|
|
%}
|
|
|
|
<hr>
|
|
|
|
<div class="content">
|
|
<p><strong>Tabs</strong> only require a <code>tabs</code> container and a <code><ul></code> list.<br>
|
|
The <strong>default</strong> tabs style has a single border at the bottom.</p>
|
|
</div>
|
|
|
|
{% include snippet.html content=tabs_example horizontal=true %}
|
|
|
|
{% include snippet.html content=tabs_example horizontal=true more=true %}
|
|
|
|
{% include anchor.html name="Alignment" %}
|
|
|
|
<div class="content">
|
|
<p>
|
|
To align the tabs list, use the <code>is-centered</code> or <code>is-right</code> modifier on the <code>.tabs</code> container:
|
|
</p>
|
|
</div>
|
|
|
|
{% include snippet.html content=tabs_centered_example horizontal=true more=true %}
|
|
|
|
{% include snippet.html content=tabs_right_example horizontal=true more=true %}
|
|
|
|
{% include anchor.html name="Icons" %}
|
|
|
|
<div class="content">
|
|
<p>You can use any of the <a href="http://fontawesome.io/">Font Awesome</a> <strong>icons</strong>.</p>
|
|
</div>
|
|
|
|
{% include snippet.html content=tabs_icons_example horizontal=true more=true %}
|
|
|
|
{% include snippet.html content=tabs_icons_example horizontal=true more=true %}
|
|
|
|
{% include anchor.html name="Sizes" %}
|
|
<div class="content">
|
|
<p>You can choose between <strong>3 additional sizes</strong>: <code>is-small</code> <code>is-medium</code> and <code>is-large</code>.</p>
|
|
</div>
|
|
|
|
{% include snippet.html content=tabs_small_example horizontal=true more=true %}
|
|
|
|
{% include snippet.html content=tabs_medium_example horizontal=true more=true %}
|
|
|
|
{% include snippet.html content=tabs_large_example horizontal=true more=true %}
|
|
|
|
{% include anchor.html name="Styles" %}
|
|
|
|
<div class="content">
|
|
If you want a more classic style with <strong>borders</strong>, just append the <code>is-boxed</code> modifier.
|
|
</div>
|
|
|
|
{% include snippet.html content=tabs_boxed_example horizontal=true more=true %}
|
|
|
|
<p class="content">
|
|
If you want <strong>mutually exclusive</strong> tabs (like radio buttons where clicking one deselects all other ones), use the <code>is-toggle</code> modifier.
|
|
</p>
|
|
|
|
{% include snippet.html content=tabs_toggle_example horizontal=true more=true %}
|
|
|
|
<p class="content">
|
|
If you want the tabs to take up the <strong>whole width</strong> available, use <code>is-fullwidth</code>.
|
|
</p>
|
|
|
|
{% include snippet.html content=tabs_fullwidth_example horizontal=true more=true %}
|
|
|
|
{% include anchor.html name="Combining" %}
|
|
|
|
<div class="content">
|
|
<p>You can <strong>combine</strong> different modifiers. For example, you can have <strong>centered boxed</strong> tabs, or <strong>fullwidth toggle</strong> ones.</p>
|
|
</div>
|
|
|
|
{% include snippet.html content=tabs_centered_boxed_example horizontal=true more=true %}
|
|
|
|
{% include snippet.html content=tabs_toggle_fullwidth_example horizontal=true more=true %}
|
|
|
|
{% include snippet.html content=tabs_centered_boxed_medium_example horizontal=true more=true %}
|
|
|
|
{% include snippet.html content=tabs_toggle_fullwidth_large_example horizontal=true more=true %}
|
|
|
|
{% include variables.html %}
|
|
|
|
</div>
|
|
</section>
|