Skip to main content
Version: v1 (Current)

CSS variable reference

The host uses underscored names; AppUI maps them to semantic tokens at :root and .gxp-theme. Values are complete CSS colors/lengths/font settings. Supply palette keys without -- to ThemeWrapper, or declare CSS variables on your theme scope.

Platform variables used by the stylesheet​

VariableStandalone fallback
--danger_button_background_color#ef4444
--danger_button_border_color#ef4444
--danger_button_text_color#ffffff
--input_field_background_color#03054a
--input_field_border_color#888c92
--input_field_error_border_color#fe4a67
--input_field_text_color#ffffff
--keyboard_key_active_background_color#ffffff
--keyboard_key_active_text_color#000596
--keyboard_key_background_color#03054a
--keyboard_key_text_color#ffffff
--modal_background_color#ffffff
--modal_text_color#222222
--modal_primary_button_background_colorprimary button variable, then #000596
--modal_primary_button_text_colorprimary button text variable, then #ffffff
--modal_primary_button_border_colorprimary button border variable, then #000596
--modal_secondary_button_background_colorsecondary button variable, then #f5f5f5
--modal_secondary_button_text_colorsecondary button text variable, then #222222
--modal_secondary_button_border_colorderived modal secondary color when unset
--page_background_color#000466
--page_text_color#ffffff
--primary_button_background_color#ffffff
--primary_button_border_color#ffffff
--primary_button_text_color#000596
--secondary_button_background_color#000466
--secondary_button_border_color#ffffff
--secondary_button_text_color#ffffff
--setting-button_text_font_familyui-sans-serif, system-ui, sans-serif
--setting-button_text_font_stylenormal
--setting-button_text_font_weight600
--setting-danger_button_shape0.5rem
--setting-heading_1_font_family"Lexend", ui-sans-serif, system-ui, sans-serif
--setting-heading_1_font_sizeInherited from host
--setting-heading_1_font_stylenormal
--setting-heading_1_font_weight700
--setting-heading_2_font_family"Lexend", ui-sans-serif, system-ui, sans-serif
--setting-heading_2_font_stylenormal
--setting-heading_2_font_weight600
--setting-logo_size0.3
--setting-paragraph_1_font_family"Lexend", ui-sans-serif, system-ui, sans-serif
--setting-paragraph_1_font_stylenormal
--setting-paragraph_1_font_weight400
--setting-paragraph_2_font_family"Lexend", ui-sans-serif, system-ui, sans-serif
--setting-paragraph_2_font_stylenormal
--setting-paragraph_2_font_weight400
--setting-primary_button_shape0.5rem
--setting-secondary_button_shape0.5rem
--setting-tertiary_button_shape0.5rem
--tertiary_button_background_colortransparent
--tertiary_button_border_colortransparent
--tertiary_button_text_color#ffffff

Modal button variables apply in .gxp-modal scopes such as Dialog/AlertDialog/Sheet. The table describes the current stylesheet's fallback chains, not literal values that ThemeWrapper writes. The semantic input/border fallback is #888c92; the legacy .input-field border has a separate transparent fallback. --setting-heading_1_font_size is a host override, not an AppUI token default.

Semantic tokens​

TokenPlatform source / default
--background, --foregroundpage background/text
--card, --card-foreground, --popover, --popover-foregroundmodal background/text
--primary, --primary-foregroundprimary button background/text
--secondary, --secondary-foregroundsecondary button background/text
--muted, --muted-foreground, --accent, --accent-foregroundinput background/text
--border, --inputinput border color
--ringprimary button border color
--destructive, --destructive-foregrounddanger button background/text (red/white fallback)
--radius0.5rem

Modal scopes additionally derive muted/accent colors with color-mix() from their surface/text colors. Plain .gxp-theme scopes use the input variables listed above.

The --input token is a border color used by primitive input outlines, not the input surface. Override semantic tokens directly on the relevant .gxp-theme scope for a design that needs distinct card/muted/input roles.

Other component settings​

Spinner uses --spinner_color and --spinner_background_color. The light/demo palettes also define these. Platform typography roles accept --setting-heading_1_font_family, --setting-heading_1_font_weight, --setting-heading_1_font_style (and the corresponding heading_2/paragraph_1/paragraph_2/button_text settings). Modal and keyboard colors can be passed through ThemeWrapper's extensible colors map.

Drawing UI additionally supports --drawing-toolbar-background and --drawing-highlight. Asset/canvas palette props, QR foreground/background, and rank colors are configurable content values. Consult each component API for those props.

Use theming overview for stylesheet entrypoints and portal behavior, and customization for complete examples.