bulma/docs/documentation/form/textarea.html

216 lines
5.8 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 %}
2017-09-18 22:33:19 +00:00
{% capture readonly_example %}
<div class="control">
<textarea class="textarea" type="text" readonly>This content is readonly</textarea>
</div>
{% endcapture %}
2017-07-17 15:02:18 +00:00
{% 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>
2017-08-30 21:33:52 +00:00
{% include snippet.html content=textarea_example %}
2017-07-17 15:02:18 +00:00
2017-07-21 07:46:03 +00:00
<div class="content">
<p>
You can set the height of the textarea using the `rows` HTML attribute.
</p>
</div>
2017-08-30 21:33:52 +00:00
{% include snippet.html content=textarea_rows_example %}
2017-07-21 07:46:03 +00:00
2017-08-14 17:25:14 +00:00
{% include anchor.html name="Colors" %}
2017-07-17 15:02:18 +00:00
2017-08-30 21:33:52 +00:00
{% include snippet.html content=colors_example %}
2017-07-17 15:02:18 +00:00
2017-08-14 17:25:14 +00:00
{% include anchor.html name="Sizes" %}
2017-07-29 14:54:51 +00:00
2017-08-30 21:33:52 +00:00
{% include snippet.html content=sizes_example %}
2017-07-17 15:02:18 +00:00
2017-08-30 21:33:52 +00:00
{% include anchor.html name="States" %}
2017-07-17 15:02:18 +00:00
<h4 class="subtitle">Normal</h4>
2017-08-30 21:33:52 +00:00
{% include snippet.html content=normal_example %}
2017-07-17 15:02:18 +00:00
<h4 class="subtitle">Hover</h4>
2017-08-30 21:33:52 +00:00
{% include snippet.html content=hover_example %}
2017-07-17 15:02:18 +00:00
<h4 class="subtitle">Focus</h4>
2017-08-30 21:33:52 +00:00
{% include snippet.html content=focus_example %}
2017-07-17 15:02:18 +00:00
<h4 class="subtitle">Loading</h4>
2017-08-30 21:33:52 +00:00
{% include snippet.html content=loading_example %}
2017-07-17 15:02:18 +00:00
{% if site.vernum >= 43 %}
<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.
</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>
2017-08-30 21:33:52 +00:00
{% include snippet.html content=disabled_example %}
2017-07-17 15:02:18 +00:00
2017-09-18 22:33:19 +00:00
<h4 class="subtitle">Readonly</h4>
<div class="tags has-addons">
<span class="tag">New</span>
<span class="tag is-info">0.5.3</span>
</div>
<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.
</p>
</div>
{% include snippet.html content=readonly_example %}
2017-07-17 15:02:18 +00:00
</div>
</section>