This commit is contained in:
Jeremy Thomas
2024-03-21 16:11:54 +00:00
parent 16f1b76881
commit 69877a652c
3261 changed files with 255369 additions and 108913 deletions

View File

@@ -1,75 +1,72 @@
---
title: Checkbox
layout: documentation
layout: docs
theme: library
doc-tab: form
doc-subtab: checkbox
breadcrumb:
- home
- documentation
- form
- form-checkbox
- home
- documentation
- form
- form-checkbox
meta:
colors: false
sizes: false
variables: false
---
{% capture checkbox_example %}
<label class="checkbox">
<input type="checkbox">
<input type="checkbox" />
Remember me
</label>
{% endcapture %}
{% capture checkbox_link_example %}
<label class="checkbox">
<input type="checkbox">
<input type="checkbox" />
I agree to the <a href="#">terms and conditions</a>
</label>
{% endcapture %}
{% capture checkbox_disabled_example %}
<label class="checkbox" disabled>
<input type="checkbox" disabled>
<input type="checkbox" disabled />
Save my preferences
</label>
{% endcapture %}
<div class="content">
<p>
The <code>checkbox</code> class is a simple wrapper around the <code>&lt;input type="checkbox"&gt;</code> HTML element. It is intentionally not styled, to preserve cross-browser compatibility and the user experience.
The <code>checkbox</code> class is a simple wrapper around the <code>&lt;input type="checkbox"&gt;</code> HTML
element. It is intentionally not styled, to preserve cross-browser compatibility and the user experience.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{checkbox_example}}
</div>
<div class="column is-half">{{ checkbox_example }}</div>
<div class="column is-half bd-highlight-full">
{% highlight html %}{{checkbox_example}}{% endhighlight %}
{% highlight html -%}
{{- checkbox_example -}}
{%- endhighlight %}
</div>
</div>
<div class="content">
<p>
You can add <strong>links</strong> to your checkbox, or even <strong>disable</strong> it.
</p>
<p>You can add <strong>links</strong> to your checkbox, or even <strong>disable</strong> it.</p>
</div>
<div class="columns">
<div class="column is-half">
{{checkbox_link_example}}
</div>
<div class="column is-half">{{ checkbox_link_example }}</div>
<div class="column is-half bd-highlight-full">
{% highlight html %}{{checkbox_link_example}}{% endhighlight %}
{% highlight html -%}
{{- checkbox_link_example -}}
{%- endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-half">
{{checkbox_disabled_example}}
</div>
<div class="column is-half">{{ checkbox_disabled_example }}</div>
<div class="column is-half bd-highlight-full">
{% highlight html %}{{checkbox_disabled_example}}{% endhighlight %}
{% highlight html -%}
{{- checkbox_disabled_example -}}
{%- endhighlight %}
</div>
</div>

View File

@@ -1,274 +1,218 @@
---
title: File upload
layout: documentation
layout: docs
theme: library
doc-tab: form
doc-subtab: file
breadcrumb:
- home
- documentation
- form
- form-file
- home
- documentation
- form
- form-file
file_name: "Screen Shot 2017-07-29 at 15.54.25.png"
variables_keys:
- $file-border-color
- $file-radius
- $file-cta-background-color
- $file-cta-color
- $file-cta-hover-color
- $file-cta-active-color
- $file-name-border-color
- $file-name-border-style
- $file-name-border-width
- $file-name-max-width
- $file-border-color
- $file-radius
- $file-cta-background-color
- $file-cta-color
- $file-cta-hover-color
- $file-cta-active-color
- $file-name-border-color
- $file-name-border-style
- $file-name-border-width
- $file-name-max-width
meta:
experimental: true
colors: true
sizes: true
variables: true
---
{% capture file %}
<div class="file">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
Choose a file…
</span>
<span class="file-label"> Choose a file… </span>
</span>
</label>
</div>
{% endcapture %}
{% capture file_name %}
<div class="file has-name">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
Choose a file…
</span>
</span>
<span class="file-name">
{{ page.file_name }}
<span class="file-label"> Choose a file… </span>
</span>
<span class="file-name"> {{ page.file_name }} </span>
</label>
</div>
{% endcapture %}
{% capture file_name_right %}
<div class="file has-name is-right">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
Choose a file…
</span>
</span>
<span class="file-name">
{{ page.file_name }}
<span class="file-label"> Choose a file… </span>
</span>
<span class="file-name"> {{ page.file_name }} </span>
</label>
</div>
{% endcapture %}
{% capture file_name_fullwidth %}
<div class="file has-name is-fullwidth">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
Choose a file…
</span>
</span>
<span class="file-name">
{{ page.file_name }}
<span class="file-label"> Choose a file… </span>
</span>
<span class="file-name"> {{ page.file_name }} </span>
</label>
</div>
{% endcapture %}
{% capture file_boxed %}
<div class="file is-boxed">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
Choose a file…
</span>
<span class="file-label"> Choose a file… </span>
</span>
</label>
</div>
{% endcapture %}
{% capture file_boxed_name %}
<div class="file has-name is-boxed">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
Choose a file…
</span>
</span>
<span class="file-name">
{{ page.file_name }}
<span class="file-label"> Choose a file… </span>
</span>
<span class="file-name"> {{ page.file_name }} </span>
</label>
</div>
{% endcapture %}
{% capture file_colors_a %}
<div class="file is-primary">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
Primary file…
</span>
<span class="file-label"> Primary file… </span>
</span>
</label>
</div>
{% endcapture %}
{% capture file_colors_b %}
<div class="file is-info has-name">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
Info file…
</span>
</span>
<span class="file-name">
{{ page.file_name }}
<span class="file-label"> Info file… </span>
</span>
<span class="file-name"> {{ page.file_name }} </span>
</label>
</div>
{% endcapture %}
{% capture file_colors_c %}
<div class="file is-warning is-boxed">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-cloud-upload-alt"></i>
</span>
<span class="file-label">
Warning file…
</span>
<span class="file-label"> Warning file… </span>
</span>
</label>
</div>
{% endcapture %}
{% capture file_colors_d %}
<div class="file is-danger has-name is-boxed">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-cloud-upload-alt"></i>
</span>
<span class="file-label">
Danger file…
</span>
</span>
<span class="file-name">
{{ page.file_name }}
<span class="file-label"> Danger file… </span>
</span>
<span class="file-name"> {{ page.file_name }} </span>
</label>
</div>
{% endcapture %}
{% capture file_centered %}
<div class="file is-centered is-boxed is-success has-name">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
Centered file…
</span>
</span>
<span class="file-name">
{{ page.file_name }}
<span class="file-label"> Centered file… </span>
</span>
<span class="file-name"> {{ page.file_name }} </span>
</label>
</div>
{% endcapture %}
{% capture file_right %}
<div class="file is-right is-info">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
Right file…
</span>
</span>
<span class="file-name">
{{ page.file_name }}
<span class="file-label"> Right file… </span>
</span>
<span class="file-name"> {{ page.file_name }} </span>
</label>
</div>
{% endcapture %}
{% capture file_javascript %}
<div id="file-js-example" class="file has-name">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
Choose a file…
</span>
</span>
<span class="file-name">
No file uploaded
<span class="file-label"> Choose a file… </span>
</span>
<span class="file-name"> No file uploaded </span>
</label>
</div>
<script>
const fileInput = document.querySelector('#file-js-example input[type=file]');
const fileInput = document.querySelector("#file-js-example input[type=file]");
fileInput.onchange = () => {
if (fileInput.files.length > 0) {
const fileName = document.querySelector('#file-js-example .file-name');
const fileName = document.querySelector("#file-js-example .file-name");
fileName.textContent = fileInput.files[0].name;
}
}
};
</script>
{% endcapture %}
@@ -276,7 +220,8 @@ meta:
<div class="content">
<p>
The <code>file</code> element is a simple <strong>interactive label</strong> that wraps an <code>&lt;input type="file"&gt;</code>. It comprises several sub-elements:
The <code>file</code> element is a simple <strong>interactive label</strong> that wraps an
<code>&lt;input type="file"&gt;</code>. It comprises several sub-elements:
</p>
<ul>
<li>
@@ -285,23 +230,15 @@ meta:
<li>
<code>file-label</code> the actual <strong>interactive</strong> and clickable part of the element
<ul>
<li>
<code>file-input</code> the <strong>native</strong> file input, hidden for styling purposes
</li>
<li><code>file-input</code> the <strong>native</strong> file input, hidden for styling purposes</li>
<li>
<code>file-cta</code> the upload <strong>call-to-action</strong>
<ul>
<li>
<code>file-icon</code> an optional <strong>upload</strong> icon
</li>
<li>
<code>file-label</code> the "Choose a file…" text
</li>
<li><code>file-icon</code> an optional <strong>upload</strong> icon</li>
<li><code>file-label</code> the "Choose a file…" text</li>
</ul>
</li>
<li>
<code>file-name</code> a container for the <strong>chosen file</strong> name
</li>
<li><code>file-name</code> a container for the <strong>chosen file</strong> name</li>
</ul>
</li>
</ul>
@@ -309,39 +246,37 @@ meta:
</ul>
</div>
{% include elements/snippet.html content=file %}
{% include elements/anchor.html name="Modifiers" %}
{% include docs/elements/snippet.html content=file %}
{% include docs/elements/anchor.html name="Modifiers" %}
<div class="columns">
<div class="column is-6">
<div class="content">
<p>
With the <code>has-name</code> modifier combined with the <code>file-name</code> element, you can add a <strong>placeholder</strong> for the selected file name.
With the <code>has-name</code> modifier combined with the <code>file-name</code> element, you can add a
<strong>placeholder</strong> for the selected file name.
</p>
</div>
<div class="bd-example">
{{ file_name }}
</div>
<div class="bd-example">{{ file_name }}</div>
</div>
<div class="column is-6 bd-highlight-full">
{% highlight html %}{{ file_name }}{% endhighlight %}
{% highlight html -%}
{{- file_name -}}
{%- endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-6">
<div class="content">
<p>
You can move the CTA to the <strong>right side</strong> with the <code>is-right</code> modifier.
</p>
</div>
<div class="bd-example">
{{ file_name_right }}
<p>You can move the CTA to the <strong>right side</strong> with the <code>is-right</code> modifier.</p>
</div>
<div class="bd-example">{{ file_name_right }}</div>
</div>
<div class="column is-6 bd-highlight-full">
{% highlight html %}{{ file_name_right }}{% endhighlight %}
{% highlight html -%}
{{- file_name_right -}}
{%- endhighlight %}
</div>
</div>
@@ -352,52 +287,49 @@ meta:
You can also <strong>expand</strong> the name to fill up the space with the <code>is-fullwidth</code> modifier.
</p>
</div>
<div class="bd-example">
{{ file_name_fullwidth }}
</div>
<div class="bd-example">{{ file_name_fullwidth }}</div>
</div>
<div class="column is-6 bd-highlight-full">
{% highlight html %}{{ file_name_fullwidth }}{% endhighlight %}
{% highlight html -%}
{{- file_name_fullwidth -}}
{%- endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-6">
<div class="content">
<p>
You can have a <strong>boxed block</strong> with the <code>is-boxed</code> modifier.
</p>
</div>
<div class="bd-example">
{{ file_boxed }}
<p>You can have a <strong>boxed block</strong> with the <code>is-boxed</code> modifier.</p>
</div>
<div class="bd-example">{{ file_boxed }}</div>
</div>
<div class="column is-6 bd-highlight-full">
{% highlight html %}{{ file_boxed }}{% endhighlight %}
{% highlight html -%}
{{- file_boxed -}}
{%- endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-6">
<div class="content">
<p>
You can <strong>combine</strong> <code>has-name</code> and <code>is-boxed</code>.
</p>
</div>
<div class="bd-example">
{{ file_boxed_name }}
<p>You can <strong>combine</strong> <code>has-name</code> and <code>is-boxed</code>.</p>
</div>
<div class="bd-example">{{ file_boxed_name }}</div>
</div>
<div class="column is-6 bd-highlight-full">
{% highlight html %}{{ file_boxed_name }}{% endhighlight %}
{% highlight html -%}
{{- file_boxed_name -}}
{%- endhighlight %}
</div>
</div>
{% include elements/anchor.html name="Colors" %}
{% include docs/elements/anchor.html name="Colors" %}
<div class="content">
<p>
You can style the file element by appending one of the <strong>{{ site.data.colors.derived | size }} color modifiers</strong>:
You can style the file element by appending one of the
<strong>{{ site.data.colors.derived | size }} color modifiers</strong>:
</p>
<ul>
{% for color in site.data.colors.derived %}
@@ -408,24 +340,19 @@ meta:
</ul>
</div>
{% include elements/snippet.html content=file_colors_a %}
{% include elements/snippet.html content=file_colors_b %}
{% include elements/snippet.html content=file_colors_c %}
{% include elements/snippet.html content=file_colors_d %}
{% include elements/anchor.html name="Sizes" %}
{% include docs/elements/snippet.html content=file_colors_a %}
{% include docs/elements/snippet.html content=file_colors_b %}
{% include docs/elements/snippet.html content=file_colors_c %}
{% include docs/elements/snippet.html content=file_colors_d %}
{% include docs/elements/anchor.html name="Sizes" %}
<div class="content">
<p>
You can append one of the <strong>4 available sizes</strong>:
</p>
<p>You can append one of the <strong>4 available sizes</strong>:</p>
<ul>
<li>
<code>is-small</code>
</li>
<li>
<code>is-normal</code> (default)
</li>
<li><code>is-normal</code> (default)</li>
<li>
<code>is-medium</code>
</li>
@@ -436,121 +363,94 @@ meta:
</div>
{% for size in site.data.sizes %}
{% capture foobar %}
{% capture foobar %}
<div class="file is-{{ size }}">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
{{ size | capitalize }} file…
</span>
<span class="file-label"> {{ size | capitalize }} file… </span>
</span>
</label>
</div>
{% endcapture %}
{% include elements/snippet.html content=foobar %}
{% include docs/elements/snippet.html content=foobar %}
{% endfor %}
{% for size in site.data.sizes %}
{% capture foobar %}
{% capture foobar %}
<div class="file is-{{ size }} has-name">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
{{ size | capitalize }} file…
</span>
</span>
<span class="file-name">
{{ page.file_name }}
<span class="file-label"> {{ size | capitalize }} file… </span>
</span>
<span class="file-name"> {{ page.file_name }} </span>
</label>
</div>
{% endcapture %}
{% include elements/snippet.html content=foobar %}
{% include docs/elements/snippet.html content=foobar %}
{% endfor %}
{% for size in site.data.sizes %}
{% capture foobar %}
{% capture foobar %}
<div class="file is-{{ size }} is-boxed">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
{{ size | capitalize }} file…
</span>
<span class="file-label"> {{ size | capitalize }} file… </span>
</span>
</label>
</div>
{% endcapture %}
{% include elements/snippet.html content=foobar %}
{% include docs/elements/snippet.html content=foobar %}
{% endfor %}
{% for size in site.data.sizes %}
{% capture foobar %}
{% capture foobar %}
<div class="file is-{{ size }} is-boxed has-name">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<input class="file-input" type="file" name="resume" />
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
{{ size | capitalize }} file…
</span>
</span>
<span class="file-name">
{{ page.file_name }}
<span class="file-label"> {{ size | capitalize }} file… </span>
</span>
<span class="file-name"> {{ page.file_name }} </span>
</label>
</div>
{% endcapture %}
{% include elements/snippet.html content=foobar %}
{% include docs/elements/snippet.html content=foobar %}
{% endfor %}
{% include elements/anchor.html name="Alignment" %}
{% include docs/elements/anchor.html name="Alignment" %}
<div class="content">
<p>
You can <strong>align</strong> the file input:
</p>
<p>You can <strong>align</strong> the file input:</p>
<ul>
<li>
to the <strong>center</strong> with the <code>is-centered</code> modifier
</li>
<li>
to the <strong>right</strong> with the <code>is-right</code> modifier
</li>
<li>to the <strong>center</strong> with the <code>is-centered</code> modifier</li>
<li>to the <strong>right</strong> with the <code>is-right</code> modifier</li>
</ul>
</div>
{% include elements/snippet.html content=file_centered %}
{% include elements/snippet.html content=file_right %}
{% include elements/anchor.html name="JavaScript" %}
{% include docs/elements/snippet.html content=file_centered %}
{% include docs/elements/snippet.html content=file_right %}
{% include docs/elements/anchor.html name="JavaScript" %}
<div class="content">
<p>
A file upload input requires JavaScript to <strong>retrieve</strong> the <strong>selected file name</strong>.
Here is an example of how this could be done:
A file upload input requires JavaScript to <strong>retrieve</strong> the <strong>selected file name</strong>. Here
is an example of how this could be done:
</p>
</div>
{% include elements/snippet.html horizontal=true content=file_javascript %}
{% include components/variables.html
type='element'
variables_keys=page.variables_keys
folder='elements'
file='form'
{% include docs/elements/snippet.html horizontal=true content=file_javascript %}
{%
include docs/components/variables.html type='element'
variables_keys=page.variables_keys folder='elements' file='form'
%}

View File

@@ -1,6 +1,7 @@
---
title: Form controls
layout: documentation
layout: docs
theme: library
doc-tab: form
doc-subtab: general
breadcrumb:
@@ -18,7 +19,6 @@ variables_keys:
- $label-weight
- $help-size
---
{% capture example %}
<div class="field">
<label class="label">Name</label>
@@ -345,9 +345,9 @@ variables_keys:
<input class="input" type="text" placeholder="Find a repository">
</div>
<div class="control">
<a class="button is-info">
<button class="button is-info">
Search
</a>
</button>
</div>
</div>
{% endcapture %}
@@ -380,9 +380,9 @@ variables_keys:
<input class="input" type="text" placeholder="Amount of money">
</p>
<p class="control">
<a class="button">
<button class="button">
Transfer
</a>
</button>
</p>
</div>
@@ -400,9 +400,9 @@ variables_keys:
<input class="input" type="text" placeholder="Amount of money">
</p>
<p class="control">
<a class="button">
<button class="button">
Transfer
</a>
</button>
</p>
</div>
{% endcapture %}
@@ -448,9 +448,9 @@ variables_keys:
<input class="input" type="text" placeholder="Amount of money">
</p>
<p class="control">
<a class="button is-primary">
<button class="button is-primary">
Transfer
</a>
</button>
</p>
</div>
{% endcapture %}
@@ -470,9 +470,9 @@ variables_keys:
<input class="input" type="text" placeholder="Amount of money">
</p>
<p class="control">
<a class="button is-primary">
<button class="button is-primary">
Transfer
</a>
</button>
</p>
</div>
{% endcapture %}
@@ -480,9 +480,9 @@ variables_keys:
{% capture group_example %}
<div class="field is-grouped">
<p class="control">
<a class="button is-primary">
<button class="button is-primary">
Submit
</a>
</button>
</p>
<p class="control">
<a class="button is-light">
@@ -495,9 +495,9 @@ variables_keys:
{% capture group_centered_example %}
<div class="field is-grouped is-grouped-centered">
<p class="control">
<a class="button is-primary">
<button class="button is-primary">
Submit
</a>
</button>
</p>
<p class="control">
<a class="button is-light">
@@ -510,9 +510,9 @@ variables_keys:
{% capture group_right_example %}
<div class="field is-grouped is-grouped-right">
<p class="control">
<a class="button is-primary">
<button class="button is-primary">
Submit
</a>
</button>
</p>
<p class="control">
<a class="button is-light">
@@ -528,9 +528,9 @@ variables_keys:
<input class="input" type="text" placeholder="Find a repository">
</p>
<p class="control">
<a class="button is-info">
<button class="button is-info">
Search
</a>
</button>
</p>
</div>
{% endcapture %}
@@ -538,69 +538,69 @@ variables_keys:
{% capture group_multiline_example %}
<div class="field is-grouped is-grouped-multiline">
<p class="control">
<a class="button">
<button class="button">
One
</a>
</button>
</p>
<p class="control">
<a class="button">
<button class="button">
Two
</a>
</button>
</p>
<p class="control">
<a class="button">
<button class="button">
Three
</a>
</button>
</p>
<p class="control">
<a class="button">
<button class="button">
Four
</a>
</button>
</p>
<p class="control">
<a class="button">
<button class="button">
Five
</a>
</button>
</p>
<p class="control">
<a class="button">
<button class="button">
Six
</a>
</button>
</p>
<p class="control">
<a class="button">
<button class="button">
Seven
</a>
</button>
</p>
<p class="control">
<a class="button">
<button class="button">
Eight
</a>
</button>
</p>
<p class="control">
<a class="button">
<button class="button">
Nine
</a>
</button>
</p>
<p class="control">
<a class="button">
<button class="button">
Ten
</a>
</button>
</p>
<p class="control">
<a class="button">
<button class="button">
Eleven
</a>
</button>
</p>
<p class="control">
<a class="button">
<button class="button">
Twelve
</a>
</button>
</p>
<p class="control">
<a class="button">
<button class="button">
Thirteen
</a>
</button>
</p>
</div>
{% endcapture %}
@@ -814,11 +814,10 @@ variables_keys:
<div class="content">
<p>
Bulma supports the following native <strong>HTML form elements</strong>: <code>&lt;form&gt;</code> <code>&lt;button&gt;</code> <code>&lt;input&gt;</code> <code>&lt;textarea&gt;</code> and <code>&lt;label&gt;</code>.
</p>
<p>
The following CSS <strong>classes</strong> are supported:
Bulma supports the following native <strong>HTML form elements</strong>: <code>&lt;form&gt;</code>
<code>&lt;button&gt;</code> <code>&lt;input&gt;</code> <code>&lt;textarea&gt;</code> and <code>&lt;label&gt;</code>.
</p>
<p>The following CSS <strong>classes</strong> are supported:</p>
<ul>
<li><code>label</code></li>
<li><code>input</code></li>
@@ -833,15 +832,17 @@ variables_keys:
<div class="content">
<p>
To maintain an evenly balanced design, Bulma provides a very useful <code>control</code> container with which you can <strong>wrap</strong> the form controls.
To maintain an evenly balanced design, Bulma provides a very useful <code>control</code> container with which you
can <strong>wrap</strong> the form controls.
<br>
When combining several controls in a <strong>form</strong>, use the <code>field</code> class as a <strong>container</strong>, to keep the spacing consistent.
When combining several controls in a <strong>form</strong>, use the <code>field</code> class as a
<strong>container</strong>, to keep the spacing consistent.
</p>
</div>
{% include elements/anchor.html name="Complete form example" %}
{% include docs/elements/anchor.html name="Complete form example" %}
{% include elements/snippet.html content=example more=true %}
{% include docs/elements/snippet.html content=example more=true %}
<div class="content">
<p>
@@ -849,7 +850,7 @@ variables_keys:
</p>
</div>
{% include elements/anchor.html name="Form field" %}
{% include docs/elements/anchor.html name="Form field" %}
<div class="content">
<p>The <code>field</code> container is a simple container for:</p>
@@ -860,19 +861,21 @@ variables_keys:
</ul>
</div>
{% include elements/snippet.html content=field_example %}
{% include docs/elements/snippet.html content=field_example %}
<div class="content">
<p>This container allows form fields to be <strong>spaced consistently</strong>.</p>
</div>
{% include elements/snippet.html content=fields_example %}
{% include docs/elements/snippet.html content=fields_example %}
{% include elements/anchor.html name="Form control" %}
{% include docs/elements/anchor.html name="Form control" %}
<div class="content">
<p>
The Bulma <code>control</code> is a versatile <strong>block</strong> container meant to <strong>enhance single form controls</strong>. Because it has the same height as the element that it wraps, it can <strong class="has-text-danger">only contain</strong> the following Bulma elements:
The Bulma <code>control</code> is a versatile <strong>block</strong> container meant to
<strong>enhance single form controls</strong>. Because it has the same height as the element that it wraps, it can
<strong class="has-text-danger">only contain</strong> the following Bulma elements:
</p>
<ul>
@@ -881,33 +884,23 @@ variables_keys:
<li><code>button</code></li>
<li><code>icon</code></li>
</ul>
<p>
This container gives the ability to:
</p>
<p>This container gives the ability to:</p>
<ul>
<li>
keep the <strong>spacing</strong> consistent
</li>
<li>
combine form controls into a <strong>group</strong>
</li>
<li>
combine form controls into a <strong>list</strong>
</li>
<li>
append and prepend <strong>icons</strong> to a form control
</li>
<li>keep the <strong>spacing</strong> consistent</li>
<li>combine form controls into a <strong>group</strong></li>
<li>combine form controls into a <strong>list</strong></li>
<li>append and prepend <strong>icons</strong> to a form control</li>
</ul>
</div>
{% include elements/snippet.html content=control_input_example %}
{% include docs/elements/snippet.html content=control_input_example %}
{% include elements/snippet.html content=control_select_example %}
{% include docs/elements/snippet.html content=control_select_example %}
{% include elements/snippet.html content=control_button_example %}
{% include docs/elements/snippet.html content=control_button_example %}
<!-- Font Awesome Icons -->
{% include elements/anchor.html name="With icons" %}
{% include docs/elements/anchor.html name="With icons" %}
<div class="content">
<p>You can append one of 2 <strong>modifiers</strong> on a control:</p>
@@ -915,118 +908,130 @@ variables_keys:
<li>
<code>has-icons-left</code>
</li>
<li>
and/or <code>has-icons-right</code>
</li>
<li>and/or <code>has-icons-right</code></li>
</ul>
<p>You also need to add a modifier on the <strong>icon</strong>:</p>
<ul>
<li>
<code>icon is-left</code> if <code>has-icons-left</code> is used
</li>
<li>
<code>icon is-right</code> if <code>has-icons-right</code> is used
</li>
<li><code>icon is-left</code> if <code>has-icons-left</code> is used</li>
<li><code>icon is-right</code> if <code>has-icons-right</code> is used</li>
</ul>
<p>The size of the <strong>input</strong> will define the size of the icon container.</p>
</div>
{% include elements/snippet.html content=icons_example clipped=true %}
{% include docs/elements/snippet.html content=icons_example clipped=true %}
<div class="content">
<p>You can append icons to <strong>select dropdowns</strong> as well.</p>
</div>
{% include docs/elements/snippet.html content=select_icons_example %}
<div class="content">
<p>
You can append icons to <strong>select dropdowns</strong> as well.
If the control contains an icon, Bulma will make sure the icon remains <strong>centered</strong>, no matter the size
of the input <em>or</em> of the icon.
</p>
</div>
{% include elements/snippet.html content=select_icons_example %}
{% include docs/elements/snippet.html content=has_icons_small_example %}
{% include docs/elements/snippet.html content=has_icons_normal_example clipped=true %}
{% include docs/elements/snippet.html content=has_icons_medium_example clipped=true %}
{% include docs/elements/snippet.html content=has_icons_large_example clipped=true %}
{% include docs/elements/anchor.html name="Form addons" %}
<div class="content">
<p>
If the control contains an icon, Bulma will make sure the icon remains <strong>centered</strong>, no matter the size of the input <em>or</em> of the icon.
If you want to <strong>attach controls</strong> together, use the <code>has-addons</code> modifier on the
<code>field</code> container:
</p>
</div>
{% include elements/snippet.html content=has_icons_small_example %}
{% include elements/snippet.html content=has_icons_normal_example clipped=true %}
{% include elements/snippet.html content=has_icons_medium_example clipped=true %}
{% include elements/snippet.html content=has_icons_large_example clipped=true %}
{% include elements/anchor.html name="Form addons" %}
<div class="content">
<p>If you want to <strong>attach controls</strong> together, use the <code>has-addons</code> modifier on the <code>field</code> container:</p>
</div>
{% include elements/snippet.html content=addons_example %}
{% include docs/elements/snippet.html content=addons_example %}
<div class="content">
<p>You can attach inputs, buttons, and dropdowns <strong>only</strong>.</p>
</div>
<div class="content">
<p>It can be useful to append a <a href="{{site.url}}/documentation/elements/button#static-button">static button</a>.</p>
<p>
It can be useful to append a <a href="{{site.url}}/documentation/elements/button#static-button">static button</a>.
</p>
</div>
{% include elements/snippet.html content=addons_static_example %}
<div class="content">
<p>Use the <code>is-expanded</code> modifier on the element you want to fill up the remaining space (in this case, the input):</p>
</div>
{% include elements/snippet.html content=addons_expanded_example horizontal=true more=true %}
<div class="content">
<p>If you want a full width select dropdown, pair <code>control is-expanded</code> with <code>select is-fullwidth</code>.</p>
</div>
{% include elements/snippet.html content=addons_expanded_fullwidth_example %}
<div class="content">
<p>Use the <code>has-addons-centered</code> or the <code>has-addons-right</code> modifiers to alter the <strong>alignment</strong>.</p>
</div>
{% include elements/snippet.html content=addons_center_example %}
{% include elements/snippet.html content=addons_right_example %}
{% include elements/anchor.html name="Form group" %}
{% include docs/elements/snippet.html content=addons_static_example %}
<div class="content">
<p>
If you want to <strong>group</strong> controls together, use the <code>is-grouped</code> modifier on the <code>field</code> container.
Use the <code>is-expanded</code> modifier on the element you want to fill up the remaining space (in this case, the
input):
</p>
</div>
{% include elements/snippet.html content=group_example %}
<div class="content">
Use the <code>is-grouped-centered</code> or the <code>is-grouped-right</code> modifiers to alter the <strong>alignment</strong>.
</p>
</div>
{% include elements/snippet.html content=group_centered_example %}
{% include elements/snippet.html content=group_right_example %}
{% include docs/elements/snippet.html content=addons_expanded_example horizontal=true more=true %}
<div class="content">
<p>
Add the <code>is-expanded</code> modifier on the control element you want to <strong>fill up the remaining space</strong> with.
If you want a full width select dropdown, pair <code>control is-expanded</code> with
<code>select is-fullwidth</code>.
</p>
</div>
{% include elements/snippet.html content=group_expanded_example %}
{% include docs/elements/snippet.html content=addons_expanded_fullwidth_example %}
<div class="content">
<p>
Use the <code>has-addons-centered</code> or the <code>has-addons-right</code> modifiers to alter the
<strong>alignment</strong>.
</p>
</div>
{% include docs/elements/snippet.html content=addons_center_example %}
{% include docs/elements/snippet.html content=addons_right_example %}
{% include docs/elements/anchor.html name="Form group" %}
<div class="content">
<p>
If you want to <strong>group</strong> controls together, use the <code>is-grouped</code> modifier on the
<code>field</code> container.
</p>
</div>
{% include docs/elements/snippet.html content=group_example %}
<div class="content">
<p>
Use the <code>is-grouped-centered</code> or the <code>is-grouped-right</code> modifiers to alter the
<strong>alignment</strong>.
</p>
</div>
{% include docs/elements/snippet.html content=group_centered_example %}
{% include docs/elements/snippet.html content=group_right_example %}
<div class="content">
<p>
Add the <code>is-expanded</code> modifier on the control element you want to
<strong>fill up the remaining space</strong> with.
</p>
</div>
{% include docs/elements/snippet.html content=group_expanded_example %}
<div id="form-group-multiline" class="content">
<p>
Add the <code>is-grouped-multiline</code> modifier to allow controls to fill up <strong>multiple lines</strong>. This is ideal for a long list of controls.
Add the <code>is-grouped-multiline</code> modifier to allow controls to fill up <strong>multiple lines</strong>.
This is ideal for a long list of controls.
</p>
</div>
{% include elements/snippet.html content=group_multiline_example clipped=true %}
{% include docs/elements/snippet.html content=group_multiline_example clipped=true %}
<div class="message is-info">
<div class="message-header">
@@ -1035,40 +1040,39 @@ variables_keys:
<div class="message-body">
<div class="content">
<p>
If you only need a list of <em>buttons</em>, try out the new <code>buttons</code> class with which you can create a <a href="{{ site.url }}/documentation/elements/button/#list-of-buttons">multiline list of buttons</a>.
If you only need a list of <em>buttons</em>, try out the new <code>buttons</code> class with which you can
create a <a href="{{ site.url }}/documentation/elements/button/#list-of-buttons">multiline list of buttons</a>.
</p>
</div>
</div>
</div>
{% include elements/anchor.html name="Horizontal form" %}
{% include docs/elements/anchor.html name="Horizontal form" %}
<div class="content">
<p>If you want a <strong>horizontal</strong> form control, use the <code>is-horizontal</code> modifier on the <code>field</code> container, in which you include:</p>
<p>
If you want a <strong>horizontal</strong> form control, use the <code>is-horizontal</code> modifier on the
<code>field</code> container, in which you include:
</p>
<ul>
<li>
<code>field-label</code> for the side label
</li>
<li>
<code>field-body</code> for the input/select/textarea container
</li>
<li><code>field-label</code> for the side label</li>
<li><code>field-body</code> for the input/select/textarea container</li>
</ul>
<p>You can use <code>is-grouped</code> or <code>has-addons</code> for the child elements.</p>
</div>
{% include elements/snippet.html content=horizontal_form_example horizontal=true more=true %}
{% include docs/elements/snippet.html content=horizontal_form_example horizontal=true more=true %}
<div class="content">
<p>
To preserve the <strong>vertical alignment</strong> of labels with each type and size of control, the <code>field-label</code> comes with <strong>4 size modifiers</strong>:
To preserve the <strong>vertical alignment</strong> of labels with each type and size of control, the
<code>field-label</code> comes with <strong>4 size modifiers</strong>:
</p>
<ul>
<li>
<code>is-small</code>
</li>
<li>
<code>is-normal</code> for any <code>input</code> or <code>button</code>
</li>
<li><code>is-normal</code> for any <code>input</code> or <code>button</code></li>
<li>
<code>is-medium</code>
</li>
@@ -1078,23 +1082,25 @@ variables_keys:
</ul>
</div>
{% include elements/snippet.html content=field_label_example horizontal=true more=true %}
{% include docs/elements/snippet.html content=field_label_example horizontal=true more=true %}
{% capture custom_message %}
Form elements can be <strong>customized</strong> using the following generic variables. Simply set one or multiple of these variables <em>before</em> importing Bulma. <a href="{{ site.url }}/documentation/overview/customize/">Learn how</a>.
{% endcapture %}
{% include elements/anchor.html name="Disabled form" %}
{% include docs/elements/anchor.html name="Disabled form" %}
<div class="content">
<p>
You can disable part or a whole form by wrapping a set of controls in a <strong>fieldset</strong> with a <code>disabled</code> HTML attribute.
You can disable part or a whole form by wrapping a set of controls in a <strong>fieldset</strong> with a
<code>disabled</code> HTML attribute.
</p>
</div>
{% include elements/snippet.html content=disabled_fields_example %}
{% include docs/elements/snippet.html content=disabled_fields_example %}
{% include components/variables.html
{%
include docs/components/variables.html
anchor_name='Control variables'
type='element'
variables_keys=page.variables_control_keys
@@ -1103,7 +1109,8 @@ variables_keys:
file='controls'
%}
{% include components/variables.html
{%
include docs/components/variables.html
anchor_name='Form variables'
type='element'
variables_keys=page.variables_keys

View File

@@ -1,104 +1,107 @@
---
title: Input
layout: documentation
layout: docs
theme: library
doc-tab: form
doc-subtab: input
breadcrumb:
- home
- documentation
- form
- form-input
- home
- documentation
- form
- form-input
variables_keys:
- $input-color
- $input-background-color
- $input-border-color
- $input-shadow
- $input-hover-color
- $input-hover-border-color
- $input-focus-color
- $input-focus-border-color
- $input-focus-box-shadow-size
- $input-focus-box-shadow-color
- $input-disabled-color
- $input-disabled-background-color
- $input-disabled-border-color
- $input-arrow
- $input-icon-color
- $input-icon-active-color
- $input-radius
- $input-color
- $input-background-color
- $input-border-color
- $input-shadow
- $input-hover-color
- $input-hover-border-color
- $input-focus-color
- $input-focus-border-color
- $input-focus-box-shadow-size
- $input-focus-box-shadow-color
- $input-disabled-color
- $input-disabled-background-color
- $input-disabled-border-color
- $input-arrow
- $input-icon-color
- $input-icon-active-color
- $input-radius
meta:
colors: true
sizes: true
variables: true
---
{% capture input_example %}
<input class="input" type="text" placeholder="Text input">
<input class="input" type="text" placeholder="Text input" />
{% endcapture %}
{% capture rounded_example %}
<input class="input is-rounded" type="text" placeholder="Rounded input">
<input class="input is-rounded" type="text" placeholder="Rounded input" />
{% endcapture %}
{% capture normal_example %}
<div class="control">
<input class="input" type="text" placeholder="Normal input">
<input class="input" type="text" placeholder="Normal input" />
</div>
{% endcapture %}
{% capture hover_example %}
<div class="control">
<input class="input is-hovered" type="text" placeholder="Hovered input">
<input class="input is-hovered" type="text" placeholder="Hovered input" />
</div>
{% endcapture %}
{% capture focus_example %}
<div class="control">
<input class="input is-focused" type="text" placeholder="Focused input">
<input class="input is-focused" type="text" placeholder="Focused input" />
</div>
{% endcapture %}
{% capture loading_example %}
<div class="control is-loading">
<input class="input" type="text" placeholder="Loading input">
<input class="input" type="text" placeholder="Loading input" />
</div>
{% endcapture %}
{% capture loading_sizes_example %}
<div class="field">
<div class="control is-small is-loading">
<input class="input is-small" type="text" placeholder="Small loading input">
<input
class="input is-small"
type="text"
placeholder="Small loading input"
/>
</div>
</div>
<div class="field">
<div class="control is-loading">
<input class="input" type="text" placeholder="Normal loading input">
<input class="input" type="text" placeholder="Normal loading input" />
</div>
</div>
<div class="field">
<div class="control is-medium is-loading">
<input class="input is-medium" type="text" placeholder="Medium loading input">
<input
class="input is-medium"
type="text"
placeholder="Medium loading input"
/>
</div>
</div>
<div class="field">
<div class="control is-large is-loading">
<input class="input is-large" type="text" placeholder="Large loading input">
<input
class="input is-large"
type="text"
placeholder="Large loading input"
/>
</div>
</div>
{% endcapture %}
{% capture disabled_example %}
<div class="control">
<input class="input" type="text" placeholder="Disabled input" disabled>
<input class="input" type="text" placeholder="Disabled input" disabled />
</div>
{% endcapture %}
{% capture readonly_example %}
<div class="control">
<input class="input" type="text" value="This text is readonly" readonly>
<input class="input" type="text" value="This text is readonly" readonly />
</div>
{% endcapture %}
{% capture static_example %}
<div class="field is-horizontal">
<div class="field-label is-normal">
@@ -107,7 +110,12 @@ meta:
<div class="field-body">
<div class="field">
<p class="control">
<input class="input is-static" type="email" value="me@example.com" readonly>
<input
class="input is-static"
type="email"
value="me@example.com"
readonly
/>
</p>
</div>
</div>
@@ -120,17 +128,16 @@ meta:
<div class="field-body">
<div class="field">
<p class="control">
<input class="input" type="email" placeholder="Recipient email">
<input class="input" type="email" placeholder="Recipient email" />
</p>
</div>
</div>
</div>
{% endcapture %}
{% capture icons_example %}
<div class="field">
<p class="control has-icons-left has-icons-right">
<input class="input" type="email" placeholder="Email">
<input class="input" type="email" placeholder="Email" />
<span class="icon is-small is-left">
<i class="fas fa-envelope"></i>
</span>
@@ -141,17 +148,16 @@ meta:
</div>
<div class="field">
<p class="control has-icons-left">
<input class="input" type="password" placeholder="Password">
<input class="input" type="password" placeholder="Password" />
<span class="icon is-small is-left">
<i class="fas fa-lock"></i>
</span>
</p>
</div>
{% endcapture %}
{% capture has_icons_small_example %}
<div class="control has-icons-left has-icons-right">
<input class="input is-small" type="email" placeholder="Email">
<input class="input is-small" type="email" placeholder="Email" />
<span class="icon is-small is-left">
<i class="fas fa-envelope"></i>
</span>
@@ -160,10 +166,9 @@ meta:
</span>
</div>
{% endcapture %}
{% capture has_icons_normal_example %}
<div class="control has-icons-left has-icons-right">
<input class="input" type="email" placeholder="Email">
<input class="input" type="email" placeholder="Email" />
<span class="icon is-small is-left">
<i class="fas fa-envelope"></i>
</span>
@@ -172,10 +177,9 @@ meta:
</span>
</div>
{% endcapture %}
{% capture has_icons_medium_example %}
<div class="control has-icons-left has-icons-right">
<input class="input is-medium" type="email" placeholder="Email">
<input class="input is-medium" type="email" placeholder="Email" />
<span class="icon is-left">
<i class="fas fa-envelope"></i>
</span>
@@ -184,10 +188,9 @@ meta:
</span>
</div>
{% endcapture %}
{% capture has_icons_large_example %}
<div class="control has-icons-left has-icons-right">
<input class="input is-large" type="email" placeholder="Email">
<input class="input is-large" type="email" placeholder="Email" />
<span class="icon is-medium is-left">
<i class="fas fa-envelope"></i>
</span>
@@ -199,7 +202,9 @@ meta:
<div class="content">
<p>
The Bulma <code>input</code> CSS class is meant for <code>&lt;input&gt;</code> HTML elements. The following <a href="http://htmlreference.io/element/input/" target="_blank">type attributes</a> are supported:
The Bulma <code>input</code> CSS class is meant for <code>&lt;input&gt;</code> HTML elements. The following
<a href="http://htmlreference.io/element/input/" target="_blank">type attributes</a>
are supported:
</p>
<ul>
<li><code>type="text"</code></li>
@@ -207,97 +212,105 @@ meta:
<li><code>type="email"</code></li>
<li><code>type="tel"</code></li>
</ul>
<p>
Several <strong>modifiers</strong> are supported which affect:
</p>
<p>Several <strong>modifiers</strong> are supported which affect:</p>
<ul>
<li>the <strong><a href="#colors">color</a></strong></li>
<li>the <strong><a href="#sizes">size</a></strong></li>
<li>the <strong><a href="#states">state</a></strong></li>
<li>
the <strong><a href="#colors">color</a></strong>
</li>
<li>
the <strong><a href="#sizes">size</a></strong>
</li>
<li>
the <strong><a href="#states">state</a></strong>
</li>
</ul>
</div>
<div class="columns">
<div class="column is-half">
{{input_example}}
</div>
<div class="column is-half">{{ input_example }}</div>
<div class="column is-half bd-highlight-full">
{% highlight html %}{{input_example}}{% endhighlight %}
{% highlight html -%}
{{- input_example -}}
{%- endhighlight %}
</div>
</div>
{% include elements/anchor.html name="Colors" %}
{% include docs/elements/anchor.html name="Colors" %}
{% for color in site.data.colors.justColors %}
{% capture foobar %}
<input class="input is-{{ color }}" type="text" placeholder="{{ color | capitalize }} input">
{% capture foobar %}
<input
class="input is-{{ color }}"
type="text"
placeholder="{{ color | capitalize }} input"
/>
{% endcapture %}
{% include elements/snippet.html content=foobar %}
{% include docs/elements/snippet.html content=foobar %}
{% endfor %}
{% include elements/anchor.html name="Sizes" %}
{% include docs/elements/anchor.html name="Sizes" %}
{% for size in site.data.sizes %}
{% capture foobar %}
<input class="input is-{{ size }}" type="text" placeholder="{{ size | capitalize }} input">
{% capture foobar %}
<input
class="input is-{{ size }}"
type="text"
placeholder="{{ size | capitalize }} input"
/>
{% endcapture %}
{% include elements/snippet.html content=foobar %}
{% include docs/elements/snippet.html content=foobar %}
{% endfor %}
{% include elements/anchor.html name="Styles" %}
{% include docs/elements/anchor.html name="Styles" %}
<div class="columns">
<div class="column is-half">{{ rounded_example }}</div>
<div class="column is-half">
{{ rounded_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ rounded_example }}{% endhighlight %}
{% highlight html -%}
{{- rounded_example -}}
{%- endhighlight %}
</div>
</div>
{% include elements/anchor.html name="States" %}
{% include docs/elements/anchor.html name="States" %}
<h4 class="title is-5">Normal</h4>
<div class="columns">
<div class="column is-half">{{ normal_example }}</div>
<div class="column is-half">
{{normal_example}}
</div>
<div class="column is-half">
{% highlight html %}{{normal_example}}{% endhighlight %}
{% highlight html -%}
{{- normal_example -}}
{%- endhighlight %}
</div>
</div>
<h4 class="title is-5">Hover</h4>
<div class="columns">
<div class="column is-half">{{ hover_example }}</div>
<div class="column is-half">
{{hover_example}}
</div>
<div class="column is-half">
{% highlight html %}{{hover_example}}{% endhighlight %}
{% highlight html -%}
{{- hover_example -}}
{%- endhighlight %}
</div>
</div>
<h4 class="title is-5">Focus</h4>
<div class="columns">
<div class="column is-half">{{ focus_example }}</div>
<div class="column is-half">
{{focus_example}}
</div>
<div class="column is-half">
{% highlight html %}{{focus_example}}{% endhighlight %}
{% highlight html -%}
{{- focus_example -}}
{%- endhighlight %}
</div>
</div>
<h4 class="title is-5">Loading</h4>
<div class="columns">
<div class="column is-half">{{ loading_example }}</div>
<div class="column is-half">
{{loading_example}}
</div>
<div class="column is-half">
{% highlight html %}{{loading_example}}{% endhighlight %}
{% highlight html -%}
{{- loading_example -}}
{%- endhighlight %}
</div>
</div>
@@ -305,58 +318,62 @@ meta:
<div class="column is-half">
<div class="content">
<p>
You can resize the loading spinner by appending <code>is-small</code>, <code>is-medium</code> or <code>is-large</code> to the <code>control</code> container.
You can resize the loading spinner by appending <code>is-small</code>, <code>is-medium</code> or
<code>is-large</code> to the <code>control</code> container.
</p>
</div>
{{loading_sizes_example}}
{{ loading_sizes_example }}
</div>
<div class="column is-half">
{% highlight html %}{{loading_sizes_example}}{% endhighlight %}
{% highlight html -%}
{{- loading_sizes_example -}}
{%- endhighlight %}
</div>
</div>
<h4 class="title is-5">Disabled</h4>
<div class="columns">
<div class="column is-half">{{ disabled_example }}</div>
<div class="column is-half">
{{disabled_example}}
</div>
<div class="column is-half">
{% highlight html %}{{disabled_example}}{% endhighlight %}
{% highlight html -%}
{{- disabled_example -}}
{%- endhighlight %}
</div>
</div>
<h4 class="title is-5">Readonly and static inputs</h4>
<div class="content">
<p>
If you use the <code>readonly</code> HTML attribute, the input will look similar to a normal one, but is not editable and has no shadow.
If you use the <code>readonly</code> HTML attribute, the input will look similar to a normal one, but is not
editable and has no shadow.
</p>
</div>
<div class="columns">
<div class="column is-half">{{ readonly_example }}</div>
<div class="column is-half">
{{ readonly_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ readonly_example }}{% endhighlight %}
{% highlight html -%}
{{- readonly_example -}}
{%- endhighlight %}
</div>
</div>
<div class="content">
<p>
If you <em>also</em> append the <code>is-static</code> modifier, it removes the background, border, shadow, and horizontal padding, while maintaining the <strong>vertical spacing</strong> so you can easily align the input in any context, like a horizontal form.
If you <em>also</em> append the <code>is-static</code> modifier, it removes the background, border, shadow, and
horizontal padding, while maintaining the <strong>vertical spacing</strong> so you can easily align the input in any
context, like a horizontal form.
</p>
</div>
<div class="bd-example">
{{ static_example }}
</div>
{% highlight html %}{{ static_example }}{% endhighlight %}
<div class="bd-example">{{ static_example }}</div>
{% highlight html -%}
{{- static_example -}}
{%- endhighlight %}
<!-- Font Awesome Icons -->
{% include elements/anchor.html name="With Font Awesome icons" %}
{% include docs/elements/anchor.html name="With Font Awesome icons" %}
<div class="content">
<p>You can append one of 2 <strong>modifiers</strong> on a control:</p>
@@ -364,27 +381,21 @@ meta:
<li>
<code>has-icons-left</code>
</li>
<li>
and/or <code>has-icons-right</code>
</li>
<li>and/or <code>has-icons-right</code></li>
</ul>
<p>You also need to add a modifier on the <strong>icon</strong>:</p>
<ul>
<li>
<code>icon is-left</code> if <code>has-icons-left</code> is used
</li>
<li>
<code>icon is-right</code> if <code>has-icons-right</code> is used
</li>
<li><code>icon is-left</code> if <code>has-icons-left</code> is used</li>
<li><code>icon is-right</code> if <code>has-icons-right</code> is used</li>
</ul>
<p>The size of the <strong>input</strong> will define the size of the icon container.</p>
</div>
<div class="columns">
<div class="column is-half">{{ icons_example }}</div>
<div class="column is-half">
{{icons_example}}
</div>
<div class="column is-half">
{% highlight html %}{{icons_example}}{% endhighlight %}
{% highlight html -%}
{{- icons_example -}}
{%- endhighlight %}
</div>
</div>
@@ -392,45 +403,47 @@ meta:
<div class="column is-half">
<div class="content">
<p>
If the control contains an icon, Bulma will make sure the icon remains <strong>centered</strong>, no matter the size of the input <em>or</em> of the icon.
If the control contains an icon, Bulma will make sure the icon remains
<strong>centered</strong>, no matter the size of the input <em>or</em> of the icon.
</p>
</div>
{{has_icons_small_example}}
{{ has_icons_small_example }}
</div>
<div class="column is-half">
{% highlight html %}{{has_icons_small_example}}{% endhighlight %}
{% highlight html -%}
{{- has_icons_small_example -}}
{%- endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-half">{{ has_icons_normal_example }}</div>
<div class="column is-half">
{{has_icons_normal_example}}
</div>
<div class="column is-half">
{% highlight html %}{{has_icons_normal_example}}{% endhighlight %}
{% highlight html -%}
{{- has_icons_normal_example -}}
{%- endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-half">{{ has_icons_medium_example }}</div>
<div class="column is-half">
{{has_icons_medium_example}}
</div>
<div class="column is-half">
{% highlight html %}{{has_icons_medium_example}}{% endhighlight %}
{% highlight html -%}
{{- has_icons_medium_example -}}
{%- endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-half">{{ has_icons_large_example }}</div>
<div class="column is-half">
{{has_icons_large_example}}
</div>
<div class="column is-half">
{% highlight html %}{{has_icons_large_example}}{% endhighlight %}
{% highlight html -%}
{{- has_icons_large_example -}}
{%- endhighlight %}
</div>
</div>
{% include components/variables.html type='element'
variables_keys=page.variables_keys
folder='elements'
file='form'
{%
include docs/components/variables.html type='element'
variables_keys=page.variables_keys folder='elements' file='form'
%}

View File

@@ -1,57 +1,55 @@
---
title: Radio button
layout: documentation
layout: docs
theme: library
doc-tab: form
doc-subtab: radio
breadcrumb:
- home
- documentation
- form
- form-radio
- home
- documentation
- form
- form-radio
meta:
colors: false
sizes: false
variables: false
---
{% capture radio_example %}
<div class="control">
<label class="radio">
<input type="radio" name="answer">
<input type="radio" name="answer" />
Yes
</label>
<label class="radio">
<input type="radio" name="answer">
<input type="radio" name="answer" />
No
</label>
</div>
{% endcapture %}
{% capture radio_default_example %}
<div class="control">
<label class="radio">
<input type="radio" name="foobar">
<input type="radio" name="foobar" />
Foo
</label>
<label class="radio">
<input type="radio" name="foobar" checked>
<input type="radio" name="foobar" checked />
Bar
</label>
</div>
{% endcapture %}
{% capture radio_disabled_example %}
<div class="control">
<label class="radio">
<input type="radio" name="rsvp">
<input type="radio" name="rsvp" />
Going
</label>
<label class="radio">
<input type="radio" name="rsvp">
<input type="radio" name="rsvp" />
Not going
</label>
<label class="radio" disabled>
<input type="radio" name="rsvp" disabled>
<input type="radio" name="rsvp" disabled />
Maybe
</label>
</div>
@@ -59,7 +57,8 @@ meta:
<div class="content">
<p>
The <code>radio</code> class is a simple wrapper around the <code>&lt;input type="radio"&gt;</code> HTML elements. It is intentionally not styled, to preserve cross-browser compatibility and the user experience.
The <code>radio</code> class is a simple wrapper around the <code>&lt;input type="radio"&gt;</code> HTML elements.
It is intentionally not styled, to preserve cross-browser compatibility and the user experience.
</p>
<p>
Make sure the linked radio buttons have the <strong>same value</strong> for their <code>name</code> HTML attribute.
@@ -67,40 +66,42 @@ meta:
</div>
<div class="columns">
<div class="column is-half">
{{radio_example}}
</div>
<div class="column is-half">{{ radio_example }}</div>
<div class="column is-half bd-highlight-full">
{% highlight html %}{{radio_example}}{% endhighlight %}
{% highlight html -%}
{{- radio_example -}}
{%- endhighlight %}
</div>
</div>
<div class="content">
<p>
You can check a radio button by <strong>default</strong> by adding the <code>checked</code> HTML attribute to the <code>&lt;input&gt;</code> element.
You can check a radio button by <strong>default</strong> by adding the <code>checked</code> HTML attribute to the
<code>&lt;input&gt;</code> element.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{radio_default_example}}
</div>
<div class="column is-half">{{ radio_default_example }}</div>
<div class="column is-half bd-highlight-full">
{% highlight html %}{{radio_default_example}}{% endhighlight %}
{% highlight html -%}
{{- radio_default_example -}}
{%- endhighlight %}
</div>
</div>
<div class="content">
<p>
You can <strong>disable</strong> a radio button by adding the <code>disabled</code> HTML attribute to both the <code>&lt;label&gt;</code> and the <code>&lt;input&gt;</code>.
You can <strong>disable</strong> a radio button by adding the <code>disabled</code> HTML attribute to both the
<code>&lt;label&gt;</code> and the <code>&lt;input&gt;</code>.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{radio_disabled_example}}
</div>
<div class="column is-half">{{ radio_disabled_example }}</div>
<div class="column is-half bd-highlight-full">
{% highlight html %}{{radio_disabled_example}}{% endhighlight %}
{% highlight html -%}
{{- radio_disabled_example -}}
{%- endhighlight %}
</div>
</div>

View File

@@ -1,19 +1,19 @@
---
title: Select
layout: documentation
layout: docs
theme: library
doc-tab: form
doc-subtab: select
breadcrumb:
- home
- documentation
- form
- form-select
- home
- documentation
- form
- form-select
meta:
colors: true
sizes: true
variables: false
---
{% capture select_example %}
<div class="select">
<select>
@@ -22,7 +22,6 @@ meta:
</select>
</div>
{% endcapture %}
{% capture select_multiple_example %}
<div class="select is-multiple">
<select multiple size="8">
@@ -41,7 +40,6 @@ meta:
</select>
</div>
{% endcapture %}
{% capture rounded_example %}
<div class="select is-rounded">
<select>
@@ -50,7 +48,6 @@ meta:
</select>
</div>
{% endcapture %}
{% capture normal_example %}
<div class="select">
<select>
@@ -59,7 +56,6 @@ meta:
</select>
</div>
{% endcapture %}
{% capture hover_example %}
<div class="select">
<select class="is-hovered">
@@ -68,7 +64,6 @@ meta:
</select>
</div>
{% endcapture %}
{% capture focus_example %}
<div class="select">
<select class="is-focused">
@@ -77,7 +72,6 @@ meta:
</select>
</div>
{% endcapture %}
{% capture loading_example %}
<div class="select is-loading">
<select>
@@ -86,7 +80,6 @@ meta:
</select>
</div>
{% endcapture %}
{% capture disabled_example %}
<div class="select is-disabled">
<select disabled>
@@ -95,7 +88,6 @@ meta:
</select>
</div>
{% endcapture %}
{% capture icons_example %}
<div class="control has-icons-left">
<div class="select">
@@ -110,7 +102,6 @@ meta:
</div>
</div>
{% endcapture %}
{% capture has_icons_small_example %}
<div class="control has-icons-left">
<div class="select is-small">
@@ -125,7 +116,6 @@ meta:
</span>
</div>
{% endcapture %}
{% capture has_icons_normal_example %}
<div class="control has-icons-left">
<div class="select">
@@ -140,7 +130,6 @@ meta:
</span>
</div>
{% endcapture %}
{% capture has_icons_medium_example %}
<div class="control has-icons-left">
<div class="select is-medium">
@@ -155,7 +144,6 @@ meta:
</span>
</div>
{% endcapture %}
{% capture has_icons_large_example %}
<div class="control has-icons-left">
<div class="select is-large">
@@ -173,48 +161,57 @@ meta:
<div class="content">
<p>
The <code>select</code> class is a simple wrapper around the <code>&lt;select&gt;</code> HTML element, which gives the styling more flexibility and support for icons.
The <code>select</code> class is a simple wrapper around the <code>&lt;select&gt;</code> HTML element, which gives
the styling more flexibility and support for icons.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{ select_example }}
</div>
<div class="column is-half">{{ select_example }}</div>
<div class="column is-half bd-highlight-full">
{% highlight html %}{{ select_example }}{% endhighlight %}
{% highlight html -%}
{{- select_example -}}
{%- endhighlight %}
</div>
</div>
<div class="content">
<p>Several <strong>modifiers</strong> are supported which affect:</p>
<ul>
<li>the <strong><a href="#colors">color</a></strong></li>
<li>the <strong><a href="#sizes">size</a></strong></li>
<li>the <strong><a href="#states">state</a></strong></li>
<li>
the <strong><a href="#colors">color</a></strong>
</li>
<li>
the <strong><a href="#sizes">size</a></strong>
</li>
<li>
the <strong><a href="#states">state</a></strong>
</li>
</ul>
</div>
{% include elements/anchor.html name="Multiple select" %}
{% include docs/elements/anchor.html name="Multiple select" %}
<div class="columns">
<div class="column is-half">
<div class="content">
<p>
You can style a <strong>multiple select</strong> dropdown, by using the <code>is-multiple</code> modifier, and by using the <code>multiple</code> HTML attribute.
You can style a <strong>multiple select</strong> dropdown, by using the <code>is-multiple</code> modifier, and
by using the <code>multiple</code> HTML attribute.
</p>
</div>
{{ select_multiple_example }}
</div>
<div class="column is-half bd-highlight-full">
{% highlight html %}{{ select_multiple_example }}{% endhighlight %}
{% highlight html -%}
{{- select_multiple_example -}}
{%- endhighlight %}
</div>
</div>
{% include elements/anchor.html name="Colors" %}
{% include docs/elements/anchor.html name="Colors" %}
{% for color in site.data.colors.justColors %}
{% capture foobar %}
{% capture foobar %}
<div class="select is-{{ color }}">
<select>
<option>Select dropdown</option>
@@ -222,36 +219,31 @@ meta:
</select>
</div>
{% endcapture %}
{% include elements/snippet.html content=foobar %}
{% include docs/elements/snippet.html content=foobar %}
{% endfor %}
{% include elements/anchor.html name="Styles" %}
{% include docs/elements/anchor.html name="Styles" %}
<div class="content">
<p>
You can create a <strong>rounded dropdown</strong> by appending the <code>is-rounded</code> modifier:
</p>
<p>You can create a <strong>rounded dropdown</strong> by appending the <code>is-rounded</code> modifier:</p>
</div>
<div class="columns">
<div class="column is-half">{{ rounded_example }}</div>
<div class="column is-half">
{{ rounded_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ rounded_example }}{% endhighlight %}
{% highlight html -%}
{{- rounded_example -}}
{%- endhighlight %}
</div>
</div>
{% include elements/anchor.html name="Sizes" %}
{% include docs/elements/anchor.html name="Sizes" %}
<div class="content">
<p>
The <code>select</code> element comes in <strong>4</strong> different sizes:
</p>
<p>The <code>select</code> element comes in <strong>4</strong> different sizes:</p>
</div>
{% for size in site.data.sizes %}
{% capture foobar %}
{% capture foobar %}
<div class="select is-{{ size }}">
<select>
<option>Select dropdown</option>
@@ -259,73 +251,65 @@ meta:
</select>
</div>
{% endcapture %}
{% include elements/snippet.html content=foobar %}
{% include docs/elements/snippet.html content=foobar %}
{% endfor %}
{% include elements/anchor.html name="States" %}
{% include docs/elements/anchor.html name="States" %}
<div class="content">
<p>
Bulma styles the different <strong>states</strong> of the <code>select</code> element. Each state is available as a pseudo-class and a CSS class:
Bulma styles the different <strong>states</strong> of the <code>select</code> element. Each state is available as a
pseudo-class and a CSS class:
</p>
<ul>
<li>
<code>:hover</code> and <code>is-hovered</code>
</li>
<li>
<code>:focus</code> and <code>is-focused</code>
</li>
<li>
<code>:active</code> and <code>is-active</code>
</li>
<li><code>:hover</code> and <code>is-hovered</code></li>
<li><code>:focus</code> and <code>is-focused</code></li>
<li><code>:active</code> and <code>is-active</code></li>
</ul>
<p>
This allows you to obtain the style of a certain state without having to trigger it.
</p>
<p>This allows you to obtain the style of a certain state without having to trigger it.</p>
</div>
<h4 class="subtitle">Normal</h4>
<div class="columns">
<div class="column is-half">{{ normal_example }}</div>
<div class="column is-half">
{{ normal_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ normal_example }}{% endhighlight %}
{% highlight html -%}
{{- normal_example -}}
{%- endhighlight %}
</div>
</div>
<h4 class="subtitle">Hover</h4>
<div class="columns">
<div class="column is-half">{{ hover_example }}</div>
<div class="column is-half">
{{ hover_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ hover_example }}{% endhighlight %}
{% highlight html -%}
{{- hover_example -}}
{%- endhighlight %}
</div>
</div>
<h4 class="subtitle">Focus</h4>
<div class="columns">
<div class="column is-half">{{ focus_example }}</div>
<div class="column is-half">
{{ focus_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ focus_example }}{% endhighlight %}
{% highlight html -%}
{{- focus_example -}}
{%- endhighlight %}
</div>
</div>
<h4 class="subtitle">Loading</h4>
<div class="columns">
<div class="column is-half">{{ loading_example }}</div>
<div class="column is-half">
{{ loading_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ loading_example }}{% endhighlight %}
{% highlight html -%}
{{- loading_example -}}
{%- endhighlight %}
</div>
</div>
{% include elements/anchor.html name="With icons" %}
{% include docs/elements/anchor.html name="With icons" %}
<div class="content">
<p>You can append the <strong>modifier</strong> on a control:</p>
@@ -336,18 +320,16 @@ meta:
</ul>
<p>You also need to add a modifier on the <strong>icon</strong>:</p>
<ul>
<li>
<code>icon is-left</code> since <code>has-icons-left</code> is used
</li>
<li><code>icon is-left</code> since <code>has-icons-left</code> is used</li>
</ul>
<p>The size of the <strong>select</strong> will define the size of the icon container.</p>
</div>
<div class="columns">
<div class="column is-half">{{ icons_example }}</div>
<div class="column is-half">
{{ icons_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ icons_example }}{% endhighlight %}
{% highlight html -%}
{{- icons_example -}}
{%- endhighlight %}
</div>
</div>
@@ -355,39 +337,42 @@ meta:
<div class="column is-half">
<div class="content">
<p>
If the control contains an icon, Bulma will make sure the icon remains <strong>centered</strong>, no matter the size of the input <em>or</em> of the icon.
If the control contains an icon, Bulma will make sure the icon remains
<strong>centered</strong>, no matter the size of the input <em>or</em> of the icon.
</p>
</div>
{{ has_icons_small_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ has_icons_small_example }}{% endhighlight %}
{% highlight html -%}
{{- has_icons_small_example -}}
{%- endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-half">{{ has_icons_normal_example }}</div>
<div class="column is-half">
{{ has_icons_normal_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ has_icons_normal_example }}{% endhighlight %}
{% highlight html -%}
{{- has_icons_normal_example -}}
{%- endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-half">{{ has_icons_medium_example }}</div>
<div class="column is-half">
{{ has_icons_medium_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ has_icons_medium_example }}{% endhighlight %}
{% highlight html -%}
{{- has_icons_medium_example -}}
{%- endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-half">{{ has_icons_large_example }}</div>
<div class="column is-half">
{{ has_icons_large_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ has_icons_large_example }}{% endhighlight %}
{% highlight html -%}
{{- has_icons_large_example -}}
{%- endhighlight %}
</div>
</div>

View File

@@ -1,31 +1,36 @@
---
title: Textarea
layout: documentation
layout: docs
theme: library
doc-tab: form
doc-subtab: textarea
breadcrumb:
- home
- documentation
- form
- form-textarea
- home
- documentation
- form
- form-textarea
meta:
colors: true
sizes: true
variables: false
---
{% capture textarea_example %}
<textarea class="textarea" placeholder="e.g. Hello world"></textarea>
{% endcapture %}
{% capture textarea_rows_example %}
<textarea class="textarea" placeholder="10 lines of textarea" rows="10"></textarea>
<textarea
class="textarea"
placeholder="10 lines of textarea"
rows="10"
></textarea>
{% endcapture %}
{% capture colors_example %}
<div class="field">
<div class="control">
<textarea class="textarea is-primary" placeholder="Primary textarea"></textarea>
<textarea
class="textarea is-primary"
placeholder="Primary textarea"
></textarea>
</div>
</div>
<div class="field">
@@ -35,21 +40,29 @@ meta:
</div>
<div class="field">
<div class="control">
<textarea class="textarea is-success" placeholder="Success textarea"></textarea>
<textarea
class="textarea is-success"
placeholder="Success textarea"
></textarea>
</div>
</div>
<div class="field">
<div class="control">
<textarea class="textarea is-warning" placeholder="Warning textarea"></textarea>
<textarea
class="textarea is-warning"
placeholder="Warning textarea"
></textarea>
</div>
</div>
<div class="field">
<div class="control">
<textarea class="textarea is-danger" placeholder="Danger textarea"></textarea>
<textarea
class="textarea is-danger"
placeholder="Danger textarea"
></textarea>
</div>
</div>
{% endcapture %}
{% capture sizes_example %}
<div class="field">
<div class="control">
@@ -63,7 +76,10 @@ meta:
</div>
<div class="field">
<div class="control">
<textarea class="textarea is-medium" placeholder="Medium textarea"></textarea>
<textarea
class="textarea is-medium"
placeholder="Medium textarea"
></textarea>
</div>
</div>
<div class="field">
@@ -72,35 +88,39 @@ meta:
</div>
</div>
{% endcapture %}
{% capture normal_example %}
<div class="control">
<textarea class="textarea" placeholder="Normal textarea"></textarea>
</div>
{% endcapture %}
{% capture hover_example %}
<div class="control">
<textarea class="textarea is-hovered" placeholder="Hovered textarea"></textarea>
<textarea
class="textarea is-hovered"
placeholder="Hovered textarea"
></textarea>
</div>
{% endcapture %}
{% capture focus_example %}
<div class="control">
<textarea class="textarea is-focused" placeholder="Focused textarea"></textarea>
<textarea
class="textarea is-focused"
placeholder="Focused textarea"
></textarea>
</div>
{% endcapture %}
{% capture loading_example %}
<div class="control is-loading">
<textarea class="textarea" placeholder="Loading textarea"></textarea>
</div>
{% endcapture %}
{% capture loading_sizes_example %}
<div class="field">
<div class="control is-small is-loading">
<textarea class="textarea is-small" placeholder="Small loading textarea"></textarea>
<textarea
class="textarea is-small"
placeholder="Small loading textarea"
></textarea>
</div>
</div>
<div class="field">
@@ -110,22 +130,30 @@ meta:
</div>
<div class="field">
<div class="control is-medium is-loading">
<textarea class="textarea is-medium" placeholder="Medium loading textarea"></textarea>
<textarea
class="textarea is-medium"
placeholder="Medium loading textarea"
></textarea>
</div>
</div>
<div class="field">
<div class="control is-large is-loading">
<textarea class="textarea is-large" placeholder="Large loading textarea"></textarea>
<textarea
class="textarea is-large"
placeholder="Large loading textarea"
></textarea>
</div>
</div>
{% endcapture %}
{% capture disabled_example %}
<div class="control">
<textarea class="textarea" placeholder="Disabled textarea" disabled></textarea>
<textarea
class="textarea"
placeholder="Disabled textarea"
disabled
></textarea>
</div>
{% endcapture %}
{% capture readonly_example %}
<div class="control">
<textarea class="textarea" readonly>This content is readonly</textarea>
@@ -134,123 +162,118 @@ meta:
<div class="content">
<p>
The Bulma <code>textarea</code> CSS class is the multiline version of the <a href="{{ site.data.links.by_id.form-input.path }}"><code>input</code> element</a>:
The Bulma <code>textarea</code> CSS class is the multiline version of the
<a href="{{ site.data.links.by_id.form-input.path }}"><code>input</code> element</a>:
</p>
</div>
{% include elements/snippet.html content=textarea_example %}
{% include docs/elements/snippet.html content=textarea_example %}
{% capture fixedsize_example %}
<div class="control">
<textarea class="textarea has-fixed-size" placeholder="Fixed size textarea"></textarea>
<textarea
class="textarea has-fixed-size"
placeholder="Fixed size textarea"
></textarea>
</div>
{% endcapture %}
<div class="content">
<p>
You can set the height of the textarea using the <code>rows</code> HTML attribute.
</p>
<p>You can set the height of the textarea using the <code>rows</code> HTML attribute.</p>
</div>
{% include elements/snippet.html content=textarea_rows_example %}
{% include elements/anchor.html name="Colors" %}
{% include docs/elements/snippet.html content=textarea_rows_example %}
{% include docs/elements/anchor.html name="Colors" %}
<div class="content">
<p>
The <code>textarea</code> element is available in several colors:
</p>
<p>The <code>textarea</code> element is available in several colors:</p>
</div>
{% for color in site.data.colors.justColors %}
{% capture foobar %}
<textarea class="textarea is-{{ color }}" placeholder="{{ color | capitalize }} textarea"></textarea>
{% capture foobar %}
<textarea
class="textarea is-{{ color }}"
placeholder="{{ color | capitalize }} textarea"
></textarea>
{% endcapture %}
{% include elements/snippet.html content=foobar %}
{% include docs/elements/snippet.html content=foobar %}
{% endfor %}
{% include elements/anchor.html name="Sizes" %}
{% include docs/elements/anchor.html name="Sizes" %}
<div class="content">
<p>
The <code>textarea</code> element comes in <strong>4 different sizes:</strong>
The <code>textarea</code> element comes in
<strong>4 different sizes:</strong>
</p>
</div>
{% include elements/snippet.html content=sizes_example %}
{% include elements/anchor.html name="States" %}
{% include docs/elements/snippet.html content=sizes_example %}
{% include docs/elements/anchor.html name="States" %}
<div class="content">
<p>
Bulma styles the different <strong>states</strong> of the <code>textarea</code> element. Each state is available as a pseudo-class and a CSS class:
Bulma styles the different <strong>states</strong> of the <code>textarea</code> element. Each state is available as
a pseudo-class and a CSS class:
</p>
<ul>
<li>
<code>:hover</code> and <code>is-hovered</code>
</li>
<li>
<code>:focus</code> and <code>is-focused</code>
</li>
<li>
<code>:active</code> and <code>is-active</code>
</li>
<li><code>:hover</code> and <code>is-hovered</code></li>
<li><code>:focus</code> and <code>is-focused</code></li>
<li><code>:active</code> and <code>is-active</code></li>
</ul>
<p>
This allows you to obtain the style of a certain state without having to trigger it.
</p>
<p>This allows you to obtain the style of a certain state without having to trigger it.</p>
</div>
<h4 class="subtitle">Normal</h4>
{% include elements/snippet.html content=normal_example %}
{% include docs/elements/snippet.html content=normal_example %}
<h4 class="subtitle">Hover</h4>
{% include elements/snippet.html content=hover_example %}
{% include docs/elements/snippet.html content=hover_example %}
<h4 class="subtitle">Focus</h4>
{% include elements/snippet.html content=focus_example %}
{% include docs/elements/snippet.html content=focus_example %}
<h4 class="subtitle">Loading</h4>
{% include elements/snippet.html content=loading_example %}
{% include docs/elements/snippet.html content=loading_example %}
<div class="columns">
<div class="column is-half">
<div class="content">
<p>
You can resize the loading spinner by appending <code>is-small</code>, <code>is-medium</code> or <code>is-large</code> to the <code>control</code> container.
You can resize the loading spinner by appending <code>is-small</code>, <code>is-medium</code> or
<code>is-large</code> to the <code>control</code> container.
</p>
</div>
{{loading_sizes_example}}
{{ loading_sizes_example }}
</div>
<div class="column is-half bd-highlight-full">
{% highlight html %}{{loading_sizes_example}}{% endhighlight %}
{% highlight html -%}
{{- loading_sizes_example -}}
{%- endhighlight %}
</div>
</div>
<h4 class="subtitle">Disabled</h4>
{% include elements/snippet.html content=disabled_example %}
{% include docs/elements/snippet.html content=disabled_example %}
<h4 class="subtitle">Readonly</h4>
<div class="content">
<p>
If you use the <code>readonly</code> HTML attribute, the textarea will look similar to a normal one, but is not editable and has no shadow.
If you use the <code>readonly</code> HTML attribute, the textarea will look similar to a normal one, but is not
editable and has no shadow.
</p>
</div>
{% include elements/snippet.html content=readonly_example %}
{% include docs/elements/snippet.html content=readonly_example %}
<h4 class="subtitle">Fixed Size</h4>
<div class="content">
<p>
You can disable a <code>textarea</code> resizing by appending the <code>has-fixed-size</code> modifier:
</p>
<p>You can disable a <code>textarea</code> resizing by appending the <code>has-fixed-size</code> modifier:</p>
</div>
{% include elements/snippet.html content=fixedsize_example %}
{% include docs/elements/snippet.html content=fixedsize_example %}