2016-09-11 11:00:49 +00:00
---
layout: documentation
doc-tab: components
doc-subtab: level
---
{% include subnav-components.html %}
< section class = "section" >
< div class = "container" >
< h1 class = "title" > Level< / h1 >
< h2 class = "subtitle" > A multi-purpose < strong > horizontal level< / strong > , which can contain almost any other element< / h2 >
2017-07-28 22:27:59 +00:00
{%
include meta.html
colors=false
sizes=false
variables=false
%}
2016-09-11 11:00:49 +00:00
< hr >
< div class = "content" >
< p > The < strong > structure< / strong > of a level is the following:< / p >
< ul >
< li >
< code > level< / code > : main container
< ul >
2017-05-20 16:59:29 +00:00
< li > < code > level-left< / code > for the left side. This element is < em > required< / em > , even if it is empty< / li >
2016-09-11 11:00:49 +00:00
< li >
< code > level-right< / code > for the right side
< ul >
< li > < code > level-item< / code > for each individual element< / li >
< / ul >
< / li >
< / ul >
< / li >
< / ul >
< p > In a < code > level-item< / code > , you can then insert almost < em > anything< / em > you want: a title, a button, a text input, or just simple text. No matter what elements you put inside a Bulma < code > level< / code > , they will always be < strong > vertically centered< / strong > .< / p >
< / div >
< div class = "structure" >
< nav class = "level structure-item is-structure-container" title = "level" >
< div class = "level-left structure-item" title = "level-left" >
< div class = "level-item" >
< p class = "subtitle is-5" >
< strong > 123< / strong > posts
< / p >
< / div >
< div class = "level-item" >
2017-03-13 12:33:34 +00:00
< div class = "field has-addons" >
< p class = "control" >
< input class = "input" type = "text" placeholder = "Find a post" >
< / p >
< p class = "control" >
< button class = "button" >
Search
< / button >
< / p >
< / div >
2016-09-11 11:00:49 +00:00
< / div >
< / div >
< div class = "level-right structure-item" title = "level-right" >
< p class = "level-item" >
< strong > All< / strong >
< / p >
< p class = "level-item" >
< a > Published< / a >
< / p >
< p class = "level-item" >
< a > Drafts< / a >
< / p >
< p class = "level-item" >
< a > Deleted< / a >
< / p >
< p class = "level-item" >
< a class = "button is-success" >
New
< / a >
< / p >
< / div >
< / nav >
< / div >
2016-10-30 17:35:39 +00:00
{% capture nav_example %}
2016-09-11 11:00:49 +00:00
<!-- Main container -->
< nav class = "level" >
<!-- Left side -->
< div class = "level-left" >
< div class = "level-item" >
< p class = "subtitle is-5" >
< strong > 123< / strong > posts
< / p >
< / div >
< div class = "level-item" >
2017-03-13 12:33:34 +00:00
< div class = "field has-addons" >
< p class = "control" >
< input class = "input" type = "text" placeholder = "Find a post" >
< / p >
< p class = "control" >
< button class = "button" >
Search
< / button >
< / p >
< / div >
2016-09-11 11:00:49 +00:00
< / div >
< / div >
<!-- Right side -->
< div class = "level-right" >
< p class = "level-item" > < strong > All< / strong > < / p >
< p class = "level-item" > < a > Published< / a > < / p >
< p class = "level-item" > < a > Drafts< / a > < / p >
< p class = "level-item" > < a > Deleted< / a > < / p >
< p class = "level-item" > < a class = "button is-success" > New< / a > < / p >
< / div >
< / nav >
2016-10-30 17:35:39 +00:00
{% endcapture %}
< div class = "example" >
{{nav_example}}
< / div >
{% highlight html %}
{{nav_example}}
2016-09-11 11:00:49 +00:00
{% endhighlight %}
< hr >
2016-10-30 17:35:39 +00:00
< h3 class = "title" > Centered level< / h3 >
< div class = "content" >
If you want a < strong > centered level< / strong > , you can use as many < code > level-item< / code > as you want, as long as they are < strong > direct< / strong > children of the < code > level< / code > container.
< / div >
{% capture nav_centered_example %}
2016-09-11 11:00:49 +00:00
< nav class = "level" >
< div class = "level-item has-text-centered" >
2016-12-22 19:37:38 +00:00
< div >
< p class = "heading" > Tweets< / p >
< p class = "title" > 3,456< / p >
< / div >
2016-09-11 11:00:49 +00:00
< / div >
< div class = "level-item has-text-centered" >
2016-12-22 19:37:38 +00:00
< div >
< p class = "heading" > Following< / p >
< p class = "title" > 123< / p >
< / div >
2016-09-11 11:00:49 +00:00
< / div >
< div class = "level-item has-text-centered" >
2016-12-22 19:37:38 +00:00
< div >
< p class = "heading" > Followers< / p >
< p class = "title" > 456K< / p >
< / div >
2016-09-11 11:00:49 +00:00
< / div >
< div class = "level-item has-text-centered" >
2016-12-22 19:37:38 +00:00
< div >
< p class = "heading" > Likes< / p >
< p class = "title" > 789< / p >
< / div >
2016-09-11 11:00:49 +00:00
< / div >
< / nav >
2016-10-30 17:35:39 +00:00
{% endcapture %}
{% capture nav_centered_bis_example %}
2016-09-11 11:00:49 +00:00
< nav class = "level" >
< p class = "level-item has-text-centered" >
< a class = "link is-info" > Home< / a >
< / p >
< p class = "level-item has-text-centered" >
< a class = "link is-info" > Menu< / a >
< / p >
< p class = "level-item has-text-centered" >
2016-12-22 19:37:38 +00:00
< img src = "{{ site.url }}/images/bulma-type.png" alt = "" style = "height: 30px;" >
2016-09-11 11:00:49 +00:00
< / p >
< p class = "level-item has-text-centered" >
< a class = "link is-info" > Reservations< / a >
< / p >
< p class = "level-item has-text-centered" >
< a class = "link is-info" > Contact< / a >
< / p >
< / nav >
2016-10-30 17:35:39 +00:00
{% endcapture %}
< div class = "example" >
{{nav_centered_example}}
< / div >
{% highlight html %}
{{nav_centered_example}}
{% endhighlight %}
< div class = "example" >
{{nav_centered_bis_example}}
< / div >
{% highlight html %}
{{nav_centered_bis_example}}
2016-09-11 11:00:49 +00:00
{% endhighlight %}
< hr >
2016-10-30 17:35:39 +00:00
< h3 class = "title" > Mobile level< / h3 >
< div class = "content" >
By default, for space concerns, the level is vertical on mobile. If you want the level to be horizontal on mobile as well, add the < code > is-mobile< / code > modifier on the < code > level< / code > container.
< / div >
{% capture nav_mobile_example %}
< nav class = "level is-mobile" >
< div class = "level-item has-text-centered" >
2016-12-22 19:37:38 +00:00
< div >
< p class = "heading" > Tweets< / p >
< p class = "title" > 3,456< / p >
< / div >
2016-10-30 17:35:39 +00:00
< / div >
< div class = "level-item has-text-centered" >
2016-12-22 19:37:38 +00:00
< div >
< p class = "heading" > Following< / p >
< p class = "title" > 123< / p >
< / div >
2016-10-30 17:35:39 +00:00
< / div >
< div class = "level-item has-text-centered" >
2016-12-22 19:37:38 +00:00
< div >
< p class = "heading" > Followers< / p >
< p class = "title" > 456K< / p >
< / div >
2016-10-30 17:35:39 +00:00
< / div >
< div class = "level-item has-text-centered" >
2016-12-22 19:37:38 +00:00
< div >
< p class = "heading" > Likes< / p >
< p class = "title" > 789< / p >
< / div >
2016-10-30 17:35:39 +00:00
< / div >
< / nav >
{% endcapture %}
< div class = "example" >
{{nav_mobile_example}}
< / div >
{% highlight html %}
{{nav_mobile_example}}
{% endhighlight %}
2016-09-11 11:00:49 +00:00
< / div >
< / section >