mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-12 05:08:18 +00:00
1.8 KiB
1.8 KiB
templateEngineOverride, layout, title, description, toc
| templateEngineOverride | layout | title | description | toc | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| njk | layouts/page.njk | Label | Renders an accessible label associated with controls. |
|
{% from "macros/code_preview.njk" import code_preview %} {% from "macros/code_block.njk" import code_block %}
{% set code %} Accept terms and conditions {% endset %} {{ code_preview("label", code) }}
Usage
Add the label class to your <label> element. Labels' style may be affected by the presence of a disabled peer or child element.
{% set code %}{% endset %} {{ code_block(code) }}
Examples
Disabled
{% set code %}
RTL
Labels support right-to-left layouts through native text flow. Add dir="rtl" to the label or an ancestor.
{% set code %}