2016-01-26 21:12:48 +03:00
|
|
|
---
|
|
|
|
layout: docs
|
|
|
|
title: Labels
|
|
|
|
group: material-design
|
|
|
|
---
|
|
|
|
|
2016-08-01 15:17:55 +03:00
|
|
|
Below is a complete list of `<label>` class options supported by Bootstrap Material Design:
|
2016-01-26 21:12:48 +03:00
|
|
|
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Classes</th>
|
|
|
|
<th>Notes</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>
|
2016-03-21 17:56:51 +03:00
|
|
|
<code>.bmd-label-static</code>
|
2016-01-26 21:12:48 +03:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% markdown %}Statically positioned above the input{% endmarkdown %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
2016-03-21 17:56:51 +03:00
|
|
|
<code>.bmd-label-placeholder</code>
|
2016-01-26 21:12:48 +03:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% markdown %}
|
|
|
|
Renders a `<label>` as a placeholder
|
|
|
|
|
|
|
|
- _focused_: not visible after first keystroke
|
|
|
|
- _unfocused & empty_: placeholder
|
|
|
|
- _unfocused & filled_: not visible
|
|
|
|
- do not use the placeholder attribute with this option
|
|
|
|
{% endmarkdown %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
2016-03-21 17:56:51 +03:00
|
|
|
<code>.bmd-label-floating</code>
|
2016-01-26 21:12:48 +03:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% markdown %}
|
|
|
|
Animated combination of placeholder and label:
|
|
|
|
|
|
|
|
- _focused_: label animates from placeholder to static label
|
|
|
|
- _unfocused & empty_: placeholder
|
2016-03-21 17:56:51 +03:00
|
|
|
- _unfocused & filled_: renders the same as `.bmd-label-static`
|
2016-01-26 21:12:48 +03:00
|
|
|
{% endmarkdown %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
## Contents
|
|
|
|
|
|
|
|
* Will be replaced with the ToC, excluding the "Contents" header
|
|
|
|
{:toc}
|
|
|
|
|
|
|
|
## Styles
|
|
|
|
|
|
|
|
{% example html %}
|
|
|
|
<form>
|
|
|
|
<fieldset class="form-group">
|
2016-03-21 17:56:51 +03:00
|
|
|
<label for="exampleInputEmail1" class="bmd-label-static">label-static</label>
|
2016-01-26 21:12:48 +03:00
|
|
|
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="placeholder text">
|
2016-03-21 17:56:51 +03:00
|
|
|
<span class="bmd-help">We'll never share your email with anyone else.</span>
|
2016-01-26 21:12:48 +03:00
|
|
|
</fieldset>
|
|
|
|
<fieldset class="form-group">
|
2016-03-21 17:56:51 +03:00
|
|
|
<label for="exampleInputEmail1" class="bmd-label-floating">label-floating</label>
|
2016-01-26 21:12:48 +03:00
|
|
|
<input type="email" class="form-control" id="exampleInputEmail1">
|
2016-03-21 17:56:51 +03:00
|
|
|
<span class="bmd-help">We'll never share your email with anyone else.</span>
|
2016-01-26 21:12:48 +03:00
|
|
|
</fieldset>
|
|
|
|
<fieldset class="form-group">
|
2016-03-21 17:56:51 +03:00
|
|
|
<label for="exampleInputEmail1" class="bmd-label-placeholder">label-placeholder</label>
|
2016-01-26 21:12:48 +03:00
|
|
|
<input type="email" class="form-control" id="exampleInputEmail1">
|
2016-03-21 17:56:51 +03:00
|
|
|
<span class="bmd-help">We'll never share your email with anyone else.</span>
|
2016-01-26 21:12:48 +03:00
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
{% endexample %}
|