Page History
...
- visibilityPolicySetId – Determines the visibility of the component based on specified policy sets. For example, setting to "adminAct
Guidelines
Usage
- Use icons for clear, concise actions or status—not decoration. Prefer text labels when meaning could be ambiguous.
- Keep inline action icons aligned consistently within their parent pattern.
- the Icon to present a recognizable symbol via
namewhen a compact, tappable affordance or status indicator is needed. - Use an Icon as an actionable control when you can wire outcomes to
ON_ICON_CLICK. - Use an Icon for data or status feedback when the graphic should react to context using
thresholdConfig. - Provide contextual hints with tooltips only as supplemental help by enabling
showTooltipand supplyingtooltipTextTranslations. Do not put critical information exclusively in the tooltipMove low-priority or extra actions into an overflow menu when space is constrained (pattern-level decision; icon supports this by remaining compact and hideable viadisplayConditions).
Sizing & Layout
- Use the component’s size tokens: size: Select an appropriate icon scale using
size(e.g.,"sm"| ,"lg". (Exact pixel mapping is defined elsewhere in the design system.) - Respect grid/spacing via container layout and the component’s
paddingClassto avoid “floating” icons. - Ensure usable tap/click targets by increasing the hit area with
paddingClassor a clickable wrapper element (if applicable in your layout).
States & Feedback
- Define and implement states at design/dev time:
- Default: base icon via
name. - Hover: optional affordance via
iconOnHover. - Focus/Active/Disabled: implement using container or host element states (e.g., button wrapper), and/or
displayConditionsto hide instead of show a disabled icon. - Provide a visible keyboard focus indicator using the wrapper/control (the Icon itself has no dedicated focus token).
Color & Contrast
- Apply high-contrast styling through your theme or container styles so icons remain legible in varied environments.
- Do not rely on color alone for meaning; pair color with icon swaps (filled/outline, warning/check) using
thresholdConfigor with nearby text.
Tooltips
- Use tooltips for supplemental context only; keep copy brief.
- Configure with component tokens:
showTooltip(on/off),tooltipTextTranslations(localized text),tooltipPlacement(top/bottom/left/right),tooltipDelay(ms before showing).- Avoid placing critical information only in a tooltip.
Interactions & Events
- Bind primary behavior to
ON_ICON_CLICK(navigate, run workflow, etc.). - Use
ON_INITfor setup andON_DESTROYfor cleanup where needed.
Data-Driven Icons (Thresholds)
- Use
thresholdConfigto map data to icon/appearance (e.g.,status: "complete"→ check;"overdue"→ warning). - Prefer icon swap or shape change (vs. subtle color changes) for state transitions.
- Keep rules mutually exclusive and stable to avoid rapid toggling.
Visibility & Authorization
- Use
displayConditionsto hide irrelevant or inapplicable icons entirely. - Use
visibilityPolicySetIdto show actions only to authorized users/roles.
Content & Localization
- Keep tooltip strings action-aligned and concise; localize with
tooltipTextTranslations(supports template expressions). - Use
displayNamefor structure-panel clarity (e.g., “Status Indicator Icon”).
Environments & Input Methods
- Assume mouse, keyboard, and touch. Increase clickable target area with
paddingClassor a wrapper element to accommodate different inputs.
Accessibility
...
- ) to match density and emphasis.
- Control horizontal growth with
widthAuto; set it totruefor intrinsic sizing, orfalsewhen the icon should fill its available width. - Adjust local spacing around the icon using
paddingClassto achieve comfortable touch or click targets and visual balance.
States & Feedback
- Provide hover affordance by specifying
iconOnHoverso the icon swaps on pointer hover. - Convey dynamic status by mapping data-driven rules to
thresholdConfigthat switchnameto appropriate status glyphs. - Surface explanatory help on hover via
showTooltipwith a consideratetooltipDelayto avoid accidental popups.
Tooltips
- Turn on tooltips with
showTooltipand provide localized copy withtooltipTextTranslations. - Position the tooltip so it does not occlude nearby content by choosing
tooltipPlacementthat best fits the context. - Use
tooltipDelayto reduce flicker during transient hovers; 300–500 ms is a common range. - Treat tooltips as supplemental only; never put essential instructions exclusively in the tooltip.
Interactions & Events
- Execute actions, navigation, or workflows when the icon is activated by handling
ON_ICON_CLICK. - Perform setup or data binding when the icon mounts by listening to
ON_INIT. - Release resources or log analytics when the icon unmounts via
ON_DESTROY.
Data-Driven / Conditional Behavior
- Define robust rule sets in
thresholdConfigthat map clear conditions to specificnamevalues, and include a default rule to prevent unmapped states. - To minimize jarring oscillation when incoming data flutters near a boundary, prefer non-overlapping, explicit conditions in
thresholdConfig.
Visibility & Authorization
- Gate visibility based on policies using
visibilityPolicySetIdwhen the icon should appear only for allowed audiences. - Show or hide the icon contextually by configuring
displayConditionstied to relevant data or state.
Content & Localization
- Localize all user-facing strings by supplying
tooltipTextTranslationsfor tooltips and localizedguidedTourHotSpotTitle/guidedTourHotSpotDescriptionwhen using hotspots.
Dos & Don’ts
| Do | Don’t | Article setting(s) |
|---|---|---|
Do provide a localized tooltip using tooltipTextTranslations when the icon meaning may be ambiguous. | Don’t rely on a tooltip as the only place to explain a critical action. | showTooltip, tooltipTextTranslations |
Do use iconOnHover to give immediate hover feedback on interactive icons. | Don’t change the icon on hover if the icon is not clickable. | iconOnHover |
Do configure a default rule in thresholdConfig to handle unexpected data. | Don’t leave gaps in conditions that cause the icon to flicker between states. | thresholdConfig |
Do choose tooltipPlacement that avoids obscuring nearby UI. | Don’t cover the icon itself with the tooltip if an alternate side is available. | tooltipPlacement |
Do use paddingClass to enlarge the tap target area visually and comfortably. | Don’t cram the icon against neighboring elements without padding. | paddingClass |
Do hide icons the user must not see using visibilityPolicySetId or displayConditions. | Don’t show unauthorized or contextually irrelevant icons. | visibilityPolicySetId, displayConditions |
Accessibility
Protocol of implemented accessibility measures
- Provide localized, concise tooltip content using
tooltipTextTranslationswhenshowTooltipis enabled to assist recognition without depending on language-specific icons. - Avoid color-only meaning by swapping to distinct glyphs or filled or outlined variants via
thresholdConfig. - Ensure icons intended as actions clearly indicate interactivity by defining
iconOnHoverso hover state is perceivable. - Expose stable hooks for automated accessibility tests and focus workflows with
dataTestIdandid. - For guided help, provide descriptive, localized copy through
guidedTourHotSpotTitleandguidedTourHotSpotDescriptionwhenenableAsHotspotis set.
Practices to improve accessibility
- Pair data-driven icon changes from
thresholdConfigwithtooltipTextTranslationsso meaning is not conveyed by color or shape alone. - Use
paddingClassto create comfortable hit areas and reduce accidental clicks, supporting motor accessibility. - Prevent surprise tooltips by setting a considerate
tooltipDelayand choosing non-obscuringtooltipPlacement.
...