2.0.0
Microcopy augments a label to describe a form element in greater detail.
See Forms for guidance on composing full forms.
Use to describe a form element in greater detail.
<div class="mds-form__field-group">
<span class="mds-form__microcopy" id="password-help-text"> Your password must contain a letter and a number. </span>
</div>
Sizing affects text size. The default size is medium, and you can use a modifier class to make the microcopy smaller (mds-form__microcopy--small
) or larger (mds-form__microcopy--large
).
<span class="mds-form__microcopy mds-form__microcopy--small"> This is example microcopy text. </span>
aria-describedby
attribute on each input
, textarea
, or select
that has an .mds-form__microcopy
component providing additional information. The value of the aria-describedby
attribute must match the id
attribute on the .mds-form__microcopy
component.mds-form__field-group
container.<div class="mds-form__field-group">
<label class="mds-form__label" for="password">Password</label>
<span class="mds-form__microcopy" id="password-help-text"> Your password must contain a letter and a number. </span>
<input class="mds-form__input" aria-describedby="password-help-text" type="password" id="password" />
</div>
Class |
Applies to |
Outcome |
---|---|---|
|
|
Adjusts styling to render small microcopy. |
|
|
Adjusts styling to render large microcopy. |