Class Theme

The theme for pre-built UIs.

The pre-built UI styles are defined by a Theme object. To configure a theme, chain calls to the config() method.

Example

TikiSdk.config()
.theme
.primaryTextColor('#000000')
.primaryBackgroundColor('#FFFFFF')
.accentColor('blue')
.fontFamily('"Space Grotesk", sans-serif')

Hierarchy

  • Theme

Constructors

  • Create a new Theme object

    Parameters

    • Optional config: Config

      The optional Config object to attach this Theme to. Required for ().

    Returns Theme

Properties

_config: any

Methods

  • Set the accent CSS color

    Parameters

    • color: string

      The color to use

    Returns Theme

  • Use to return to parent Config object for chaining

    Returns Config

    Example

    TikiSdk.config()
    .theme
    .primaryTextColor('#000000')
    .primaryBackgroundColor('#FFFFFF')
    .accentColor('blue')
    .fontFamily('"Space Grotesk", sans-serif')
    .and()
    .dark
    .primaryTextColor('#FFFFFF')
    .primaryBackgroundColor('#000000')
  • Set the CSS font family

    Parameters

    • val: string

      The font family to use

    Returns Theme

  • Set the primary background CSS color

    Parameters

    • color: string

      The color to use

    Returns Theme

  • Set the primary text CSS color

    Parameters

    • color: string

      The color to use

    Returns Theme

  • Set the secondary background CSS color

    Parameters

    • color: string

      The color to use

    Returns Theme

  • Set the secondary text CSS color

    Parameters

    • color: string

      The color to use

    Returns Theme