Skip to main content

Theme variables

Design tokens for lightweight customization of all SDK UI. See the theming guide for more context.

GustoSDKTheme

Complete set of design tokens that control the SDK's visual theme. Pass a Partial<GustoSDKTheme> to GustoProvider to override specific tokens; any token not supplied falls back to the SDK default.

Example

import { GustoProvider } from '@gusto/embedded-react-sdk'

function App() {
return (
<GustoProvider
theme={{
colorPrimary: '#007bff',
fontSizeRegular: '18px',
inputRadius: '12px',
}}
>
{/* your app */}
</GustoProvider>
)
}

Extends

Properties

PropertyTypeDefault valueDescription
badgeRadiusstringBorder radius of badges.
bannerRadiusstringBorder radius of banners.
boxRadiusstringBorder radius of box/panel surfaces.
buttonRadiusstringBorder radius of buttons.
cardRadiusstringBorder radius of card surfaces.
colorBodystringBackground color of the main content area.
colorBodyAccentstringSubtle accent background, used for hover states and alternating rows.
colorBodyContentstringPrimary text color rendered on body backgrounds.
colorBodySubContentstringSecondary/muted text color for supporting copy and labels.
colorBorderPrimarystringColor of primary borders (inputs, cards, dividers).
colorBorderSecondarystringColor of secondary/subtle borders.
colorButtonIconstringColor of icon-only buttons.
colorErrorstringBackground for error banners and inline validation states.
colorErrorAccentstringBorder, icon accent, and field error indicator inside error surfaces.
colorErrorContentstringText color rendered on error surfaces.
colorInfostringBackground for informational banners and callouts.
colorInfoAccentstringBorder or icon accent inside informational surfaces.
colorInfoContentstringText color rendered on informational surfaces.
colorPrimarystringBrand primary color, used for primary buttons and active states.
colorPrimaryAccentstringHover/pressed tint for primary elements.
colorPrimaryContentstringText or icon color rendered on primary backgrounds.
colorSecondarystringBrand secondary color, used for secondary buttons and surfaces.
colorSecondaryAccentstringHover/pressed tint for secondary elements.
colorSecondaryContentstringText or icon color rendered on secondary backgrounds.
colorSuccessstringBackground for success banners and confirmation states.
colorSuccessAccentstringBorder or icon accent inside success surfaces.
colorSuccessContentstringText color rendered on success surfaces.
colorWarningstringBackground for warning banners and callouts.
colorWarningAccentstringBorder or icon accent inside warning surfaces.
colorWarningContentstringText color rendered on warning surfaces.
focusRingColorstringcolorPrimaryColor of the keyboard focus ring.
focusRingWidthstringWidth of the keyboard focus ring.
fontFamilystringFont family stack applied to all SDK text.
fontLineHeightExtraSmallstringLine height for extra-small text.
fontLineHeightLargestringLine height for large text.
fontLineHeightRegularstringLine height for regular/body text.
fontLineHeightSmallstringLine height for small text.
fontSizeExtraSmallstringFont size for extra-small text.
fontSizeHeading1stringFont size for H1 headings.
fontSizeHeading2stringFont size for H2 headings.
fontSizeHeading3stringFont size for H3 headings.
fontSizeHeading4stringFont size for H4 headings.
fontSizeHeading5stringFont size for H5 headings.
fontSizeHeading6stringFont size for H6 headings.
fontSizeLargestringFont size for large text.
fontSizeRegularstringFont size for regular/body text.
fontSizeRootstringRoot document font size as a numeric string (no px suffix). Used as the rem base.
fontSizeSmallstringFont size for small text.
fontWeightBoldstringFont weight for bold text.
fontWeightMediumstringFont weight for medium-emphasis text.
fontWeightRegularstringFont weight for regular text.
fontWeightSemiboldstringFont weight for semibold text.
inputAdornmentColorstringcolorBodySubContentColor of leading/trailing adornment icons in inputs.
inputBackgroundColorstringcolorBodyBackground color of text inputs and selects.
inputBorderColorstringBorder color of text inputs and selects.
inputBorderWidthstringBorder width of text inputs and selects.
inputContentColorstringcolorBodyContentText color inside text inputs and selects.
inputDescriptionColorstringcolorBodySubContentColor of form field description/hint text.
inputDisabledBackgroundColorstringcolorBodyAccentBackground color of disabled inputs.
inputErrorColorstringcolorErrorAccentColor of inline field error messages.
inputLabelColorstringcolorBodyContentColor of form field labels.
inputLabelFontSizestringFont size of form field labels.
inputLabelFontWeightstringFont weight of form field labels.
inputPlaceholderColorstringcolorBodySubContentPlaceholder text color inside inputs.
inputRadiusstringBorder radius of text inputs and selects.
shadowRestingstringBox shadow for resting/default elevation.
shadowTopmoststringBox shadow for elevated/topmost surfaces such as dropdowns and modals.
transitionDurationstringDuration of UI transitions, e.g. "200ms".

GustoSDKThemeColors

Color tokens that can be overridden to customize the SDK's visual theme. Pass a Partial<GustoSDKThemeColors> when constructing a Partial<GustoSDKTheme> to supply to GustoProvider.

Extended by

Properties

PropertyTypeDescription
colorBodystringBackground color of the main content area.
colorBodyAccentstringSubtle accent background, used for hover states and alternating rows.
colorBodyContentstringPrimary text color rendered on body backgrounds.
colorBodySubContentstringSecondary/muted text color for supporting copy and labels.
colorBorderPrimarystringColor of primary borders (inputs, cards, dividers).
colorBorderSecondarystringColor of secondary/subtle borders.
colorButtonIconstringColor of icon-only buttons.
colorErrorstringBackground for error banners and inline validation states.
colorErrorAccentstringBorder, icon accent, and field error indicator inside error surfaces.
colorErrorContentstringText color rendered on error surfaces.
colorInfostringBackground for informational banners and callouts.
colorInfoAccentstringBorder or icon accent inside informational surfaces.
colorInfoContentstringText color rendered on informational surfaces.
colorPrimarystringBrand primary color, used for primary buttons and active states.
colorPrimaryAccentstringHover/pressed tint for primary elements.
colorPrimaryContentstringText or icon color rendered on primary backgrounds.
colorSecondarystringBrand secondary color, used for secondary buttons and surfaces.
colorSecondaryAccentstringHover/pressed tint for secondary elements.
colorSecondaryContentstringText or icon color rendered on secondary backgrounds.
colorSuccessstringBackground for success banners and confirmation states.
colorSuccessAccentstringBorder or icon accent inside success surfaces.
colorSuccessContentstringText color rendered on success surfaces.
colorWarningstringBackground for warning banners and callouts.
colorWarningAccentstringBorder or icon accent inside warning surfaces.
colorWarningContentstringText color rendered on warning surfaces.