mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-14 11:14:24 +00:00
203 lines
5.5 KiB
HTML
203 lines
5.5 KiB
HTML
---
|
|
title: Textarea
|
|
layout: documentation
|
|
doc-tab: form
|
|
doc-subtab: textarea
|
|
---
|
|
|
|
{% 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>
|
|
{% 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>
|
|
{%
|
|
include meta.html
|
|
colors=true
|
|
sizes=true
|
|
variables=false
|
|
%}
|
|
|
|
<hr>
|
|
|
|
{% include snippet.html content=textarea_example %}
|
|
|
|
<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>
|
|
|
|
{% include snippet.html content=textarea_rows_example %}
|
|
|
|
{% include anchor.html name="Colors" %}
|
|
|
|
{% include snippet.html content=colors_example %}
|
|
|
|
{% include anchor.html name="Sizes" %}
|
|
|
|
{% include snippet.html content=sizes_example %}
|
|
|
|
{% include anchor.html name="States" %}
|
|
|
|
<h4 class="subtitle">Normal</h4>
|
|
|
|
{% include snippet.html content=normal_example %}
|
|
|
|
<h4 class="subtitle">Hover</h4>
|
|
|
|
{% include snippet.html content=hover_example %}
|
|
|
|
<h4 class="subtitle">Focus</h4>
|
|
|
|
{% include snippet.html content=focus_example %}
|
|
|
|
<h4 class="subtitle">Loading</h4>
|
|
|
|
{% include snippet.html content=loading_example %}
|
|
|
|
{% 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>
|
|
|
|
{% include snippet.html content=disabled_example %}
|
|
|
|
</div>
|
|
</section>
|