bulma/docs/documentation/form/textarea.html

271 lines
7.4 KiB
HTML
Raw Normal View History

2017-07-17 15:02:18 +00:00
---
2017-07-29 12:02:00 +00:00
title: Textarea
2017-07-17 15:02:18 +00:00
layout: documentation
doc-tab: form
doc-subtab: textarea
---
{% capture textarea_example %}
2017-07-21 07:46:03 +00:00
<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>
2017-07-17 15:02:18 +00:00
{% endcapture %}
{% capture colors_example %}
<div class="field">
<div class="control">
<textarea class="textarea is-primary" type="text" placeholder="Primary textarea"></textarea>
</div>
</div>
<div class="field">
<div class="control">
<textarea class="textarea is-info" type="text" placeholder="Info textarea"></textarea>
</div>
</div>
<div class="field">
<div class="control">
<textarea class="textarea is-success" type="text" placeholder="Success textarea"></textarea>
</div>
</div>
<div class="field">
<div class="control">
<textarea class="textarea is-warning" type="text" placeholder="Warning textarea"></textarea>
</div>
</div>
<div class="field">
<div class="control">
<textarea class="textarea is-danger" type="text" placeholder="Danger textarea"></textarea>
</div>
</div>
{% endcapture %}
{% capture sizes_example %}
<div class="field">
<div class="control">
<textarea class="textarea is-small" type="text" placeholder="Small textarea"></textarea>
</div>
</div>
<div class="field">
<div class="control">
<textarea class="textarea" type="text" placeholder="Normal textarea"></textarea>
</div>
</div>
<div class="field">
<div class="control">
<textarea class="textarea is-medium" type="text" placeholder="Medium textarea"></textarea>
</div>
</div>
<div class="field">
<div class="control">
<textarea class="textarea is-large" type="text" placeholder="Large textarea"></textarea>
</div>
</div>
{% endcapture %}
{% capture normal_example %}
<div class="control">
<textarea class="textarea" type="text" placeholder="Normal textarea"></textarea>
</div>
{% endcapture %}
{% capture hover_example %}
<div class="control">
<textarea class="textarea is-hovered" type="text" placeholder="Hovered textarea"></textarea>
</div>
{% endcapture %}
{% capture focus_example %}
<div class="control">
<textarea class="textarea is-focused" type="text" placeholder="Focused textarea"></textarea>
</div>
{% endcapture %}
{% capture loading_example %}
<div class="control is-loading">
<textarea class="textarea" type="text" 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" type="text" placeholder="Small loading textarea"></textarea>
</div>
</div>
<div class="field">
<div class="control is-loading">
<textarea class="textarea" type="text" placeholder="Normal loading textarea"></textarea>
</div>
</div>
<div class="field">
<div class="control is-medium is-loading">
<textarea class="textarea is-medium" type="text" placeholder="Medium loading textarea"></textarea>
</div>
</div>
<div class="field">
<div class="control is-large is-loading">
<textarea class="textarea is-large" type="text" placeholder="Large loading textarea"></textarea>
</div>
</div>
{% endcapture %}
{% capture disabled_example %}
<div class="control">
<textarea class="textarea" type="text" placeholder="Disabled textarea" disabled></textarea>
</div>
{% endcapture %}
{% include subnav-form.html %}
<section class="section">
<div class="container">
<h1 class="title">Textarea</h1>
<h2 class="subtitle">
The multiline <strong>textarea</strong> and its variations
</h2>
2017-07-29 14:54:51 +00:00
{%
include meta.html
colors=true
sizes=true
variables=false
%}
2017-07-17 15:02:18 +00:00
<hr>
<div class="content">
<p>The following <strong>modifiers</strong> are supported:</p>
<ul>
<li>the <strong><a href="#input-color">color</a></strong></li>
<li>the <strong><a href="#input-size">size</a></strong></li>
<li>the <strong><a href="#input-state">state</a></strong></li>
</ul>
</div>
<div class="columns">
<div class="column is-half">
{{textarea_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{textarea_example}}{% endhighlight %}
</div>
</div>
2017-07-21 07:46:03 +00:00
<div class="content">
<p>
<span class="tag is-success">New!</span>
<span class="tag is-info">0.4.4</span>
</p>
<p>
You can set the height of the textarea using the `rows` HTML attribute.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{textarea_rows_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{textarea_rows_example}}{% endhighlight %}
</div>
</div>
2017-08-14 17:25:14 +00:00
{% include anchor.html name="Colors" %}
2017-07-17 15:02:18 +00:00
<div class="columns">
<div class="column is-half">
{{colors_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{colors_example}}{% endhighlight %}
</div>
</div>
2017-08-14 17:25:14 +00:00
{% include anchor.html name="Sizes" %}
2017-07-29 14:54:51 +00:00
2017-07-17 15:02:18 +00:00
<div class="columns">
<div class="column is-half">
{{sizes_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{sizes_example}}{% endhighlight %}
</div>
</div>
<hr>
<h3 id="input-state" class="title">States</h3>
<h4 class="subtitle">Normal</h4>
<div class="columns">
<div class="column is-half">
{{normal_example}}
</div>
<div class="column is-half">
{% 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">
{% 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">
{% 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">
{% highlight html %}{{loading_example}}{% endhighlight %}
</div>
</div>
{% if site.vernum >= 43 %}
<div class="columns">
<div class="column is-half">
<p style="margin-bottom: 0.5rem;">
<span class="tag is-success">New!</span>
<span class="tag is-info">0.4.3</span>
</p>
<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.
</p>
</div>
{{loading_sizes_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{loading_sizes_example}}{% endhighlight %}
</div>
</div>
{% endif %}
<h4 class="subtitle">Disabled</h4>
<div class="columns">
<div class="column is-half">
{{disabled_example}}
</div>
<div class="column is-half">
{% highlight html %}{{disabled_example}}{% endhighlight %}
</div>
</div>
</div>
</section>