Unit consist of Length, Area and Volume. All units are localized for ‘en_GB’.
Adding units is done in the unit.config.js by adding variants.
All units are collated onto one page.
Units consist of two context items; label and unit.
Label is the full name of the unit and must be human readable.
Unit is the localized symbol for each unit.
Global
/components/02-form-elements/input/_input.scss/components/02-form-elements/input-type/_input-type.scssassets/sass/partials/vars/_forms.sccs
<div class="field">
<label class="label venus " for="Cubic-metres">
Volume in cubic metres
</label>
<div class="input-type input-type--unit">
<input data-qa="input-number" id="Cubic-metres" class="input input--number input-type__input" name="Cubic-metres" value="" pattern="[0-9]*">
<abbr title="Cubic-metres" class="input-type__type" id="Cubic-metres-type"> m³</abbr>
</div>
</div>
{
"label": "Cubic-metres",
"unit": " m³",
"label_for": "Cubic-metres",
"label_text": "Volume in cubic metres"
}