Developer Docs

Touchpoint

Theming

Touchpoint provides powerful theming capabilities that let you match your brand's visual identity. While the system offers comprehensive customization options, most applications can achieve a cohesive look by adjusting just two key properties.

Quick Customization

For most applications, customizing accent and fontFamily properties will create a branded experience:

  • Example: accent to rgb(28, 99, 218)
  • Example: fontFamily to "Helvetica Neue", sans-serif
1const touchpointInstance = await nlxai.touchpointUi.create({ 2 config: { 3 // Your base configuration 4 }, 5 theme: { 6 // The primary color for buttons and highlights 7 accent: "rgb(28, 99, 218)", // Use your brand's primary color 8 9 // The font for all text in the interface 10 fontFamily: '"Helvetica Neue", sans-serif', // Use your brand's font 11 }, 12});

The accent color is used for:

  • Interactive buttons
  • Selected state highlights
  • Important UI elements
  • Focus indicators

The font family affects all text in the interface, ensuring consistent typography throughout your chat experience.

Dark Mode Support

Touchpoint automatically adapts your theme for both light and dark modes. Use the light-dark() method for accent colors to provide accents for either mode. Set your preferred mode using the colorMode prop:

1const touchpointInstance = await nlxai.touchpointUi.create({ 2 config: { 3 // Your base configuration 4 }, 5 colorMode: "dark", // or "light" 6 theme: { 7 accent: "light-dark(rgb(28, 99, 218), rgb(38, 99, 118))", // provide accent for both dark and light mode. 8 fontFamily: '"Helvetica Neue", sans-serif', 9 }, 10});

Advanced Customization

For applications needing more detailed control, Touchpoint provides extensive customization options. These advanced settings let you fine-tune every aspect of the interface's appearance.

Primary Colors

Primary colors control text and interactive elements, with variants for different opacity levels:

PropertyDescription
primary80Primary color at 80% opacity
primary60Primary color at 60% opacity
primary40Primary color at 40% opacity
primary20Primary color at 20% opacity
primary10Primary color at 10% opacity
primary5Primary color at 5% opacity
primary1Primary color at 1% opacity

Secondary Colors

Secondary colors are used for backgrounds and supporting elements:

PropertyDescription
secondary80Secondary color at 80% opacity
secondary60Secondary color at 60% opacity
secondary40Secondary color at 40% opacity
secondary20Secondary color at 20% opacity
secondary10Secondary color at 10% opacity
secondary5Secondary color at 5% opacity
secondary1Secondary color at 1% opacity

Additional Colors

PropertyDescription
accent20Accent color at 20% opacity
backgroundMain background color
overlayColor for the overlay behind the chat window

Status Colors

PropertyDescription
warningPrimaryPrimary warning color
warningSecondarySecondary warning color
errorPrimaryPrimary error color
errorSecondarySecondary error color

Layout

PropertyDescription
innerBorderRadiusBorder radius for inner elements (buttons)
outerBorderRadiusBorder radius for outer elements (cards)

See the Setup Documentation for more information about configuration options.