Page History
(this page was created automatically. In case of formatting issues, please visit the official Wiki Page)
Title
Link to Figma: https://www.figma.com/design/yck1tcUXgdQ5aYX6iUAwrO/GE---Astronaut-Design-System?node-id=0-1&t=ftfrOGkPzlG2GaTo-1
Overview
- The Title component is a text heading element with customizable styling.
- It supports six heading levels (H1–H6) for clear hierarchy.
- It includes alignment options for flexible text placement.
- It can show tooltips with translations when users hover over the text.
- It is useful for section headings, page titles, and emphasized content.
...
- visibilityPolicySetId – Determines the visibility of the component based on specified policy sets. For example, setting to "adminOnlyPolicy" restricts the title visibility to users with administrative privileges, allowing for role-based UI customization.
Guidelines
[NO DATA AVAILABLE]
Accessibility
...
Usage
- Use the correct heading level with
headerStyle(h1–h6) to encode hierarchy. Reserveh1for the highest-level title; useh2–h6for subsections the component labels. - Provide concise, localized copy via
textTranslations; prefer plain language and avoid embedding long explanations in the title text. - Align page-level titles with
textAlign: "center"when the title is the primary focus; align section headers withtextAlign: "left"for faster scanning.
Sizing & Layout
- Constrain line length using
widthso headings remain readable (typographic heuristics recommend ~45–75 characters per line). - Add breathing room around the heading using a single
paddingClassvalue to separate it from adjacent content.
States & Feedback
- The component exposes no focus/active/disabled states. The only interactive feedback is the optional hover tooltip, controlled by
showTooltip(see Tooltips).
Color & Contrast
- Set
textColorto meet contrast requirements; don’t use color alone to signal importance—encode hierarchy withheaderStyle.
Tooltips
- Enable with
showTooltip; provide localized copy viatooltipTextTranslations. - Use
tooltipPlacement(top,right,bottom,left) to avoid covering nearby controls. - Add a modest
tooltipDelay(e.g., ≥300 ms) to reduce accidental triggers. Tooltips are supplemental; never the sole place for critical info.
Data-Driven / Conditional Behavior
- Use
textTranslationstemplate expressions to inject runtime context (e.g., a customer name) while keeping the base string short.
Visibility & Authorization
- Gate visibility by role/policy with
visibilityPolicySetId. - Show or hide based on state/data rules with
displayConditions.
Content & Localization
- Localize all user-facing strings via
textTranslationsand, if used,tooltipTextTranslations. - For guided onboarding, opt in with
enableAsHotspotand provide localizedguidedTourHotSpotTitleandguidedTourHotSpotDescription. - Provide stable hooks for automation with
idanddataTestId.
Dos & Don’ts
| Do | Don’t | Article setting(s) |
|---|---|---|
Use headerStyle="h1" only for the top-level page title; use h2+ for sections. | Make multiple unrelated headings h1. | headerStyle |
| Keep titles short and localize them. | Ship English-only strings or paragraphs as titles. | textTranslations |
| Left-align section headings for scanability. | Center-align long, multi-line section headers. | textAlign |
| Constrain width to keep lines readable. | Let headings span edge-to-edge with unreadable long lines. | width |
| Add space with a single padding utility. | Chain multiple padding utilities in the paddingClass value. | paddingClass |
| Use a tooltip to clarify a term; add a small delay. | Put critical instructions only in a tooltip. | showTooltip, tooltipTextTranslations, tooltipDelay |
| Ensure sufficient contrast for readability. | Pick text colors with poor contrast on the background. | textColor |
| Show/hide based on explicit rules. | Leave irrelevant titles visible at all times. | displayConditions |
| Initialize dynamic text on mount; clean up on unmount. | Start listeners and never dispose them. | ON_INIT, ON_DESTROY |
| Gate by role when needed. | Expose sensitive titles to all users. | visibilityPolicySetId |
Accessibility (de-duplicated)
- Provide localized, descriptive headings via
textTranslations. - Use semantic hierarchy via
headerStyleand readable alignment withtextAlign. - Ensure legibility through adequate contrast using
textColor. - Avoid tooltip-only information; if used, localize and delay slightly with
tooltipTextTranslationsandtooltipDelay. - Expose deterministic automation hooks for testing via
dataTestIdandid. - Avoid color-only emphasis: pair
textColorchoices with semantic levels inheaderStyle. - Keep headings readable by constraining
width; add spacing withpaddingClassto separate from neighboring content. - Reduce cognitive load by hiding irrelevant headings using
visibilityPolicySetIdanddisplayConditions.