Skip to content

EnLabelIndicators ​

The icons that follow a field's label text: an info tooltip, the critical-field warning, and the lock for controls that have no input box to draw one in. EnFormGroup and the option groups render this for you from their tooltip, critical and locked props, so most forms never touch it directly. Use it when you build a label by hand and want it to read like the generated ones.

Preview ​

Props ​

NameDescriptionDefaultControl
tooltip

Text for an info tooltip. Uses en-components' EnTooltip when the app has registered it globally, and a titled info icon otherwise.

string
""
tooltipProps

Extra props for the EnTooltip or EnPopover behind tooltip, passed straight through: maxWidth, placement, width and so on, plus title for a popover. Max width defaults to 250 for a tooltip, wider than EnTooltip's own 150, because a label tooltip usually holds a sentence or two, and to 300 for a popover, narrower than EnPopover's fixed 400 so a short note does not open a panel wider than the field.

Record<string, any>
{}
popover

Shows tooltip in en-components' EnPopover instead of EnTooltip: a click-to-open panel with a title bar, for text too long to hover over. Falls back to EnTooltip, then to the titled icon, when the app has not registered EnPopover.

boolean
false
critical

Shows the critical-field warning icon.

boolean
false
locked

Shows the lock icon.

boolean
false
lockedMessage

Why the field is locked. Shown as a tooltip on the lock icon, which becomes focusable so the text is reachable from the keyboard while the control itself is disabled.

string
""

Slots ​

No slots defined.

Events ​

No events defined.

Methods ​

No methods defined.

Guidelines ​

  • The asterisk stays on the left; everything else trails. Put the component after the label text, inside the label element, so the icons are read as part of it.
  • Nothing to show renders nothing. With every prop empty or false the component renders no element at all, so it can be wired unconditionally.
  • The tooltip needs en-components. It uses EnTooltip when the app has registered it, and falls back to a titled info icon otherwise. With popover it uses a click-to-open EnPopover instead, falling back to EnTooltip and then the titled icon when EnPopover isn't registered. The lockedMessage tooltip uses en-components' v-tooltip the same way, with a native title as the fallback.
  • EnFormGroup — When to mark a field critical or locked, and what each state looks like on the control.
  • Forms styleguide — The is-critical, is-locked and form-label-indicator classes behind it.