Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

TokenDescription
displayNameDisplay name shown in the structure panel.
contextJsonSchemaDefines schema for context data used with the button.
textTranslationsSets the button text with multi-language support.
sizeDetermines button size: medium, large, or extra_large.
typeSpecifies visual style: primary, secondary, or ghost.
showTooltipControls whether tooltip is displayed on hover.
tooltipTextTranslationsTooltip text with multi-language support.
iconRightIcon displayed on the right side of button text.
iconLeftIcon displayed on the left side of button text.
tooltipPlacementPosition of tooltip: top, bottom, left, right.
tooltipDelayDelay in ms before tooltip appears.
widthAutoAdjusts width automatically to content if true.
heightAutoAdjusts height automatically to content if true.
paddingClassConfigures spacing around button via CSS classes.
eventsConfigures component events.
ON_BUTTON_CLICK (Events)Event triggered when button is clicked.
ON_GLOBAL_PARAMETERS_CHANGE (Events)Event triggered when global parameters affecting the button change.
ON_INIT (Events)Event triggered when the button is initialized.
ON_DESTROY (Events)Event triggered when the button is removed from DOM.
authorizationDisableDefines policy set for enabling or disabling button.
visibilityPolicySetIdDefines policy set for button visibility.
displayConditionsRules for showing or hiding button.
idUnique identifier for programmatic access.
dataTestIdTesting hook ID for automated tests.
enableAsHotspotEnables button as hotspot for guided tours.
guidedTourHotSpotTitleTitle for guided tour hotspot, with translations.
guidedTourHotSpotDescriptionDescription for guided tour hotspot, with translations.

...

  • authorizationDisable – Specifies a policy set that determines whether the button should be enabled or disabled based on user permissions. For example, setting to "editingPermissions" would disable the button for users who don't have editing permissions, while still showing it in the interface.
  • visibilityPolicySetId – Determines the visibility of the component based on specified policy sets. For example, setting to "adminActions" makes the button visible only to users with administrator privileges.
  • Figma: https://www.figma.com/design/yck1tcUXgdQ5aYX6iUAwrO/GE---Astronaut-Design-System?node-id=11523-163008&t=iosNC2AkSTGs5lMh-1
  • Live style guide: https://e1-dev.k8s.myapp.de/live-style-guide/id2/1-button

Guidelines

Hierarchy

  • Buttons follow a visual hierarchy that reads right → left.
  • Primary is the most important action and should stand out (e.g., Save, Submit, Apply).
  • Danger (semantic) is for destructive actions; a lone, strongly destructive primary (e.g., Delete) may use the semantic style.
  • Secondary covers all other, less prominent actions (e.g., Copy, Cancel).
  • Negative path is a non-committing alternative; treat it as a separate, lower-emphasis option.

Guidelines for button hierachy visualizedPlacement

Sizing & Layout

  • In dialog button groups: Cancel far left, Primary far right, and only one primary per dialog; buttons are full-bleed at the bottom.
  • Single-button dialogs: one primary spanning the full width.
  • Two buttons: secondary on the left, primary on the right; each 50% width.
  • Three buttons: each 33.33%; only the rightmost may be primary (if actions are equal, use three secondary).
  • Place action buttons as close as possible to the content they affect; in toolbars, right-align them.
  • In relevant empty states, include a primary action button (or direct link) to guide the next step.

Guidelines on button placementImage Removed

...

  • Select size (medium, large, extra_large) to match emphasis and readability needs.
  • Let the control fit content via widthAuto and heightAuto; tune spacing with paddingClass.

Guidelines on button placementImage Added

Tooltips

  • Enable with showTooltip and provide concise, localized tooltipTextTranslations.
  • Position using tooltipPlacement (top, right, bottom, left).
  • Add tooltipDelay (e.g., 300 ms) to reduce accidental reveals.
  • Treat tooltips as supplemental only.

Visibility & Authorization

  • Hide entirely for restricted audiences via visibilityPolicySetId.
  • Keep visible but non-interactive for permission gaps via authorizationDisable.
  • Expose automation hooks with id and dataTestId.

Content & Localization

  • Use clear, descriptive verbs for labels (e.g., Add, Delete, Save).
  • Avoid vague terms like OK or Done.
  • Localize tooltip microcopy via tooltipTextTranslations.
  • For guided onboarding, opt into hotspots with enableAsHotspot, guidedTourHotSpotTitle, and guidedTourHotSpotDescription.

Dos & Don’ts

DoDon’tArticle setting(s)
Use a clear verb like “Submit” and localize it.Use vague labels like “OK” or leave a default.textTranslations
Use type="primary" for the single most important action.Mark multiple buttons as primary in the same context.type
Add an icon to support meaning, keeping text.Replace the text with an icon only.iconLeft, iconRight, textTranslations
Disable when permission is insufficient.Hide the button when users should understand they lack permission.authorizationDisable
Hide sensitive actions users must not see.Show a sensitive action and rely only on disable.visibilityPolicySetId
Show the button only when prerequisites are met.Keep it visible and interactive regardless of state.displayConditions
Provide short, localized tooltip microcopy.Put critical instructions solely in the tooltip.showTooltip, tooltipTextTranslations, tooltipDelay
Use built-in sizing and intrinsic fit.Hard-code size with external CSS.size, widthAuto, heightAuto, paddingClass
Wire the action to the click event.Depend on external surfaces to trigger logic.ON_BUTTON_CLICK, events

Do's and Don'ts for button

Accessibility

...

  • Localize all user-facing strings: textTranslations, tooltipTextTranslations, guidedTourHotSpotTitle, guidedTourHotSpotDescription.
  • Avoid color-only distinctions by pairing type with clear labels and optional icons (iconLeft/iconRight).
  • Increase target clarity with size and paddingClass when needed.
  • Use authorizationDisable to communicate lack of permission versus visibilityPolicySetId when the action must be concealed.
  • Choose tooltipPlacement that avoids covering adjacent content; add tooltipDelay to reduce accidental reveals.