Themes

What is a theme?

In order to understand what a theme is, we need to understand first that the definition of colors, sizes, shapes... is an intrinsic part of a design system. Since these parameters are essential for guaranteeing accessibility and a good user experience, having the ability of changing them, might go frontally against the intentions of the design system.

This is precisely what themes are, just custom defined objects that allow users to override fundamental decisions of Halstack Design System. They are a way of escaping the restrictions imposed by the Design System, and using themes could result in applications not being compliant with the Halstack guidelines, or even introducing many different types of accessibility issues if not used carefully.

Typically, you would create a Halstack Design System application, and after that, only if there is a white-labeling requirement, we would apply a theme on top of the base application. This, and only this, is the whole purpose of using themes.

Different theming strategies

As explained in the previous section, themes are basically a list of properties that allow you to override fundamental decisions of the design system. Based on the amount of decisions that can be overridden, Halstack Design System has two different theming strategies:

  • Opinionated theme. This theming strategy lets you change some decisions of the design system, but is still opinionated about the ones we consider fundamental. The list of configurable properties is small, but it applies at the component level. You can generate the theme object using our opinionated theme generator.
  • Advanced theme. This theming strategy lets you change most of the design decisions of the design system (all the design tokens), trying to be as little opinionated as possible. Have in mind that it is impossible to make the components 100% configurable without writing actual code, since some design decisions are structural to the component. The list of configurable properties is large, and it applies at the component level. You can generate the theme object using our advanced theme generator.

Opinionated theme inputs list

Tokens in the second column, which names are in bold, will have the value that results from applying the transformation indicated in brackets to the 'Theme input'. (If nothing, they will have the same value as the 'Theme input').

Theme inputs value must be hexadecimal without alpha channel.

Accordion

Theme InputTokens (calculation)
Accent colorarrowColor

iconColor

focusBorderColor

hoverBackgroundColor (16% of opacity)
Font colorassistiveTextFontColor

titleLabelFontColor

Button

Theme InputTokens (calculation)
Base colorprimaryBackgroundColor

secondaryFontColor

secondaryBorderColor

secondaryHoverBackgroundColor

textFontColor

primaryHoverBackgroundColor (-8% of lightness)

primaryActiveBackgroundColor (-18% of lightness)

secondaryActiveBackgroundColor (-18% of lightness)

textHoverBackgroundColor (+57% of lightness)

textActiveBackgroundColor (+52% of lightness)
Primary font colorprimaryFontColor
Secondary hover font colorsecondaryHoverFontColor

Checkbox

Theme InputTokens (calculation)
Base colorbackgroundColorChecked

borderColor

hoverBackgroundColorChecked (-15% of lightness)

hoverBorderColor (-15% of lightness)
Check colorcheckColor
Font colorfontColor

Chip

Theme InputTokens (calculation)
Base colorbackgroundColor
Font colorfontColor

iconColor

Date Input

Theme InputTokens (calculation)
Selected date background colorpickerSelectedDateBackgroundColor

pickerHoverDateBackgroundColor (34% of opacity)
Selected date font colorpickerSelectedDateColor
Theme InputTokens (calculation)
Base colorbuttonBackgroundColor

hoverButtonBackgroundColor (34% of opacity)

activeButtonBackgroundColor (70% of opacity)

hoverOptionBackgroundColor (34% of opacity)

activeOptionBackgroundColor (70% of opacity)
Font colorbuttonFontColor

caretIconColor

buttonIconColor
Option font coloroptionFontColor

optionIconColor

File input

Theme InputTokens (calculation)
Font colorlabelFontColor

helperTextFontColor

dropLabelFontColor

fileNameFontColor
Theme InputTokens (calculation)
Base colorbackgroundColor
Font colorbottomLinksFontColor

copyrightFontColor

socialLinksColor
Accent colorbottomLinksDividerColor
Logologo
Theme InputTokens (calculation)
Base colorbackgroundColor
Accent colorunderlinedColor
Font colorhamburguerFontColor
Menu base colormenuBackgroundColor
Hamburguer colorhamburguerIconColor

hamburguerHoverColor (16% of opacity)
Logologo
Responsive logologoResponsive
Content colorcontentColor

Paginator

Theme InputTokens (calculation)
Base colorbackgroundColor
Font colorfontColor

Progress bar

Theme InputTokens (calculation)
Base colortotalLineColor
Accent colortrackLineColor
Font colorlabelFontColor

valueFontColor

helperTextFontColor

Radio Group

Theme InputTokens (calculation)
Base colorradioInputColor
Font colorlabelFontColor

helperTextFontColor

radioInputLabelFontColor

Select

Theme InputTokens (calculation)
Selected option background colorselectedListOptionBackgroundColor

selectedHoverListOptionBackgroundColor (-5% of lightness)

selectedActiveListOptionBackgroundColor (-10% of lightness)
Font colorlistOptionFontColor

valueFontColor

labelFontColor

helperTextFontColor

placeholderFontColor (50% of opacity)

collapseIndicatorColor

Sidenav

Theme InputTokens (calculation)
Base colorbackgroundColor

Slider

Theme InputTokens (calculation)
Base colorthumbBackgroundColor

tickBackgroundColor

trackLineColor

hoverThumbBackgroundColor (-15% of lightness)

activeThumbBackgroundColor (-15% of lightness)

totalLineColor (34% of opacity)
Font colorlabelFontColor

helperTextFontColor

limitValuesFontColor

Spinner

Theme InputTokens (calculation)
Base colortotalCircleColor
Accent colortrackCircleColor
Font colorlabelFontColor

progressValueFontColor

Switch

Theme InputTokens (calculation)
Checked base colorcheckedTrackBackgroundColor

disabledCheckedTrackBackgroundColor (34% of opacity)

Table

Theme InputTokens (calculation)
Base colorheaderBackgroundColor
Header font colorheaderFontColor

sortIconColor
Cell font colordataFontColor

Tabs

Theme InputTokens (calculation)
Base colorselectedFontColor

selectedIconColor

selectedUnderlineColor

focusOutline

hoverBackgroundColor (+58% of lightness)

pressedBackgroundColor (+53% of lightness)

Text input

Theme InputTokens (calculation)
Font colorlabelFontColor

helperTextFontColor

valueFontColor

actionIconColor

hoverActionIconColor

focusActionIconColor

activeActionIconColor

suffixColor (50% of opacity)

prefixColor (50% of opacity)

placeholderFontColor (50% of opacity)

Toggle group

Theme InputTokens (calculation)
Selected base colorselectedBackgroundColor

unselectedActiveBackgroundColor

selectedHoverBackgroundColor (-8% of lightness)

selectedActiveBackgroundColor (-18% of lightness)

selectedDisabledBackgroundColor (+57% of lightness)
Selected font colorselectedFontColor

selectedDisabledFontColor (+42% of lightness)
Unselected base colorunselectedBackgroundColor

unselectedHoverBackgroundColor (-8% of lightness)
Unselected font colorunselectedFontColor

Wizard

Theme InputTokens (calculation)
Base colorselectedStepBackgroundColor
Font colorselectedStepBorderColor
Selected font colorselectedStepFontColor
Font colorvisitedLabelFontColor

selectedLabelFontColor

visitedHelperTextFontColor

selectedHelperTextFontColor

unvisitedStepBorderColor (60% of opacity)

unvisitedStepFontColor (60% of opacity)

unvisitedLabelFontColor (60% of opacity)

unvisitedHelperTextFontColor (60% of opacity)