When you combine multiple components in the same application, a handful of shared patterns keep everything consistent and maintainable. This page covers those patterns: authentication, data configuration, state syncing, and layout, so you can wire things up correctly from the start.
Every component that fetches data from the Luzmo API needs an embed authorization token . This token is not the same as your org API credentials -- it is a short-lived, scoped token that you generate server-side and pass to the browser.
For a full walkthrough of how to request and manage embed tokens, see Generating an Embed token .
The two-tier model works as follows:
Server-side -- your backend uses your API key and token (environment variables, never shipped to the client) to call the Luzmo SDK and generate an embed authorization object.
Client-side -- your frontend fetches that object from your backend and reads the authKey / authToken fields (or id / token if you return the raw Luzmo authorization object). These are passed to every component.
All components that access data accept the same two properties: auth-key and auth-token . Set them consistently on every component instance:
<luzmo-item-slot-drop-panel
auth-key="your-auth-key"
auth-token="your-auth-token"
item-type="bar-chart">
</luzmo-item-slot-drop-panel>
<luzmo-data-field-panel
auth-key="your-auth-key"
auth-token="your-auth-token">
</luzmo-data-field-panel>
<luzmo-embed-viz-item
auth-key="your-auth-key"
auth-token="your-auth-token"
app-server="https://app.luzmo.com"
api-host="https://api.luzmo.com">
</luzmo-embed-viz-item> All components share a single set of CSS custom properties prefixed with --luzmo- . Because custom properties inherit through the DOM, you can theme every component at once by setting variables on a common ancestor -- typically :root or html .
:root {
--luzmo-primary: #0052cc;
--luzmo-background-color: #fafafa;
--luzmo-font-family: 'Inter', sans-serif;
--luzmo-font-color: #1a1a1a;
--luzmo-border-radius: 6px;
}You can also scope overrides to a container so that components in different parts of your app look different:
.dark-sidebar {
--luzmo-background-color: #1e1e1e;
--luzmo-font-color: #e0e0e0;
--luzmo-border-color: #333;
}If your app already has a design-token system, you can easily map your tokens to the Luzmo variables in one place:
:root {
--luzmo-primary: var(--brand-primary);
--luzmo-secondary: var(--brand-accent);
--luzmo-background-color: var(--surface-default);
--luzmo-font-color: var(--text-default);
--luzmo-font-family: var(--font-stack);
--luzmo-border-radius: var(--radius-m);
--luzmo-border-color: var(--border-default);
}The most commonly overridden variable groups are:
| Group | Key variables |
|---|---|
| Brand colors | --luzmo-primary , --luzmo-secondary and their hover/down/focus variants |
| Surfaces | --luzmo-background-color , --luzmo-background-color-hover , --luzmo-background-color-highlight |
| Typography | --luzmo-font-family , --luzmo-font-color , --luzmo-font-size (and size scale: -xs through -xxl ) |
| Borders | --luzmo-border-color , --luzmo-border-radius (and size scale: -s through -full ), --luzmo-border-width |
| Spacing | --luzmo-spacing-1 through --luzmo-spacing-5 |
For a complete overview, these are all global theme tokens along with their default values:
| Name | Description | Default |
|---|---|---|
--luzmo-animation-duration | Transition and animation timing. | 0.15s |
--luzmo-border-color | Base border color. | rgba(var(--luzmo-border-color-rgb), 0.1) |
--luzmo-border-color-hover | Border color on hover. | rgba(var(--luzmo-border-color-rgb), 0.15) |
--luzmo-border-color-down | Border color while pressed. | rgba(var(--luzmo-border-color-rgb), 0.3) |
--luzmo-border-color-focus | Border color on focus. | rgba(var(--luzmo-border-color-rgb), 0.15) |
--luzmo-border-color-rgb | RGB channels for border color math. | 0, 0, 0 |
--luzmo-border-color-full | Opaque border color. | rgb(180, 180, 180) |
--luzmo-border-color-full-hover | Opaque border color on hover. | rgb(140, 140, 140) |
--luzmo-border-color-full-down | Opaque border color while pressed. | rgb(110, 110, 110) |
--luzmo-border-color-full-focus | Opaque border color on focus. | rgb(140, 140, 140) |
--luzmo-border-color-disabled | Border color for disabled state. | #dddddd |
--luzmo-border-radius | Default corner radius. | 6px |
--luzmo-border-radius-s | Small corner radius. | 4px |
--luzmo-border-radius-l | Large corner radius. | 8px |
--luzmo-border-radius-xl | Extra-large corner radius. | 12px |
--luzmo-border-radius-full | Fully rounded radius. | 999rem |
--luzmo-background-color | Base surface background. | #ffffff |
--luzmo-background-color-rgb | RGB channels for background math. | 255, 255, 255 |
--luzmo-background-color-disabled | Background for disabled state. | #eeeeee |
--luzmo-background-color-hover | Background on hover. | #f0f0fc |
--luzmo-background-color-down | Background while pressed. | #f1f1ff |
--luzmo-background-color-focus | Background on focus. | #f0f0fc |
--luzmo-background-color-highlight | Highlight surface background. | rgb(240, 240, 240) |
--luzmo-background-color-highlight-disabled | Highlight background for disabled state. | rgb(245, 245, 245) |
--luzmo-background-color-highlight-hover | Highlight background on hover. | rgb(225, 225, 225) |
--luzmo-background-color-highlight-down | Highlight background while pressed. | rgb(215, 215, 215) |
--luzmo-background-color-highlight-focus | Highlight background on focus. | rgb(225, 225, 225) |
--luzmo-background-color-alt-1 | Alternate surface background 1. | rgb(250, 250, 250) |
--luzmo-background-color-alt-2 | Alternate surface background 2. | rgb(239, 239, 239) |
--luzmo-border-width | Default border width. | 1px |
--luzmo-font-family | Base font stack. | -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Helvetica, Arial, sans-serif |
--luzmo-font-size-xs | Extra-small font size. | 10px |
--luzmo-font-size-s | Small font size. | 12px |
--luzmo-font-size-m | Medium font size. | 14px |
--luzmo-font-size | Default font size. | 14px |
--luzmo-font-size-l | Large font size. | 16px |
--luzmo-font-size-xl | Extra-large font size. | 18px |
--luzmo-font-size-xxl | Double extra-large font size. | 20px |
--luzmo-font-style | Base font style. | normal |
--luzmo-line-height | Base line height. | normal |
--luzmo-font-weight | Regular font weight. | 400 |
--luzmo-font-weight-semibold | Semibold font weight. | 500 |
--luzmo-font-weight-bold | Bold font weight. | 600 |
--luzmo-font-color | Base text color. | #333 |
--luzmo-font-color-hard | High-contrast text color. | #000 |
--luzmo-font-color-disabled | Text color for disabled state. | var(--luzmo-color-disabled) |
--luzmo-font-color-extra-dimmed | Extra-dimmed text color. | #888 |
--luzmo-font-color-hover | Text color on hover. | #333 |
--luzmo-font-color-down | Text color while pressed. | #111 |
--luzmo-font-color-focus | Text color on focus. | #333 |
--luzmo-scrollbar-size | Scrollbar thickness. | 6px |
--luzmo-scrollbar-width | Firefox scrollbar width mode. | thin |
--luzmo-scrollbar-track-background | Scrollbar track background. | transparent |
--luzmo-scrollbar-track-border-radius | Scrollbar track corner radius. | var(--luzmo-border-radius-s) |
--luzmo-scrollbar-thumb-background | Scrollbar thumb background. | rgba(var(--luzmo-border-color-rgb), 0.3) |
--luzmo-scrollbar-thumb-border-radius | Scrollbar thumb corner radius. | var(--luzmo-border-radius-s) |
--luzmo-scrollbar-thumb-hover-background | Scrollbar thumb background on hover. | rgba(var(--luzmo-border-color-rgb), 0.4) |
--luzmo-primary | Primary brand color. | #4434ff |
--luzmo-primary-hover | Primary color on hover. | #4234e4 |
--luzmo-primary-down | Primary color while pressed. | #392cc7 |
--luzmo-primary-focus | Primary color on focus. | #4234e4 |
--luzmo-primary-inverse-color | Text color on primary surfaces. | #ffffff |
--luzmo-primary-rgb | RGB channels for primary color math. | 68, 52, 255 |
--luzmo-secondary | Secondary brand color. | #ff00ff |
--luzmo-secondary-hover | Secondary color on hover. | #e309e3 |
--luzmo-secondary-down | Secondary color while pressed. | #c711c7 |
--luzmo-secondary-focus | Secondary color on focus. | #e309e3 |
--luzmo-secondary-inverse-color | Text color on secondary surfaces. | #ffffff |
--luzmo-secondary-rgb | RGB channels for secondary color math. | 255, 0, 255 |
--luzmo-secondary-outline | Secondary outline/halo color. | rgba(255, 0, 255, 0.2) |
--luzmo-negative-color | Negative/critical color. | #ca221c |
--luzmo-negative-color-hover | Negative color on hover. | #b3241f |
--luzmo-negative-color-down | Negative color while pressed. | #9f231f |
--luzmo-negative-color-focus | Negative color on focus. | #b3241f |
--luzmo-negative-color-rgb | RGB channels for negative color math. | 202, 34, 28 |
--luzmo-positive-color | Positive/success color. | rgb(20, 150, 101) |
--luzmo-positive-color-hover | Positive color on hover. | rgb(17, 128, 86) |
--luzmo-positive-color-down | Positive color while pressed. | rgb(16, 105, 71) |
--luzmo-positive-color-focus | Positive color on focus. | rgb(17, 128, 86) |
--luzmo-positive-color-rgb | RGB channels for positive color math. | 20, 150, 101 |
--luzmo-selected-color | Selected state color. | rgb(110, 110, 110) |
--luzmo-selected-color-hover | Selected color on hover. | rgb(70, 70, 70) |
--luzmo-selected-color-down | Selected color while pressed. | rgb(40, 40, 40) |
--luzmo-selected-color-focus | Selected color on focus. | rgb(70, 70, 70) |
--luzmo-selected-color-hard | High-contrast selected color. | #1e1e1e |
--luzmo-selected-color-hard-hover | High-contrast selected color on hover. | rgb(0, 0, 0) |
--luzmo-selected-color-hard-down | High-contrast selected color while pressed. | rgb(0, 0, 0) |
--luzmo-selected-color-hard-focus | High-contrast selected color on focus. | rgb(0, 0, 0) |
--luzmo-color-informative | Informational color. | #1a77e9 |
--luzmo-color-informative-rgb | RGB channels for informative color math. | 26, 119, 233 |
--luzmo-color-disabled | Generic disabled color token. | #aaaaaa |
--luzmo-spacing-1 | Spacing scale step 1. | 2px |
--luzmo-spacing-2 | Spacing scale step 2. | 4px |
--luzmo-spacing-3 | Spacing scale step 3. | 8px |
--luzmo-spacing-4 | Spacing scale step 4. | 12px |
--luzmo-spacing-5 | Spacing scale step 5. | 16px |
--luzmo-indicator-gap | Gap between element and indicator. | 2px |
--luzmo-indicator-width | Indicator stroke width. | 1px |
--luzmo-indicator-color | Indicator color. | var(--luzmo-primary) |
--luzmo-component-height-xxs | Component height XXS. | 20px |
--luzmo-component-height-xs | Component height XS. | 24px |
--luzmo-component-height-s | Component height S. | 28px |
--luzmo-component-height | Default component height. | 32px |
--luzmo-component-height-l | Component height L. | 40px |
--luzmo-component-height-xl | Component height XL. | 48px |
--luzmo-component-height-xxl | Component height XXL. | 64px |
--luzmo-icon-size-xxs | Icon size XXS. | 12px |
--luzmo-icon-size-xs | Icon size XS. | 14px |
--luzmo-icon-size-s | Icon size S. | 16px |
--luzmo-icon-size-m | Icon size M. | 18px |
--luzmo-icon-size-l | Icon size L. | 20px |
--luzmo-icon-size-xl | Icon size XL. | 22px |
--luzmo-icon-size-xxl | Icon size XXL. | 32px |
Individual components also expose component-specific CSS variables (e.g. --luzmo-item-slot-drop-panel-gap ). See each component's reference page for the full list.
These components render labels, placeholders, and tooltips in the language you specify. There are two properties to be aware of:
language -- controls the UI language (button labels, slot names, menu items). Supported values: en , nl , fr , es , de .
content-language -- controls locale-aware formatting and data labels (number formats, date patterns). Defaults to the value of language .
Dataset columns and formulas store their display names as language maps. When you provide data to components (for example through datasetsDataFields ), include translations for every language you want to support:
const datasets = [
{
id: 'ds_1',
name: { en: 'Sales', nl: 'Verkoop', fr: 'Ventes' },
columns: [
{
id: 'col_revenue',
name: { en: 'Revenue', nl: 'Omzet', fr: 'Revenu' },
type: 'numeric'
}
]
}
]; The component will pick the translation that matches its active language (or content-language for data labels).
Use ACK to let users configure a visualization, then pass that state into Flex SDK to render it. ACK components help users build and edit the chart configuration, while luzmo-embed-viz-item and framework wrappers such as luzmo-viz-item consume that configuration and draw the chart. Your application sits between the two and remains the single source of truth.
| Flex SDK input | What it controls | ACK component(s) | Integration note |
|---|---|---|---|
type | Which visualization to render | Slot and option components that use item-type | Keep the ACK item-type and Flex type aligned so the editor UI and rendered chart stay in sync. For the available chart types, see the Flex component API reference and Flex chart docs . |
slots | What data the chart uses | luzmo-item-slot-drop , luzmo-item-slot-drop-panel , luzmo-item-slot-picker , luzmo-item-slot-picker-panel | These components define which data fields are assigned to each chart slot. Store the emitted slotsContents state in your app and pass it to the viz item slots property. |
options | How the chart looks and behaves | luzmo-item-option , luzmo-item-option-panel | These components edit the visualization settings. Store the emitted options object in your app and pass it to the viz item options property. |
filters | Which rows are included | luzmo-filters | This component defines the filter logic applied to the query. Store the emitted filters in your app and pass them to the viz item filters property. |
In practice, the wiring pattern is straightforward:
const itemType = 'bar-chart';
let slotsContents = [];
let options = {};
let filters = [];
// ACK updates your application state through component events.
// Your application then passes that state into Flex SDK.
vizItem.type = itemType;
vizItem.slots = slotsContents;
vizItem.options = options;
vizItem.filters = filters;This is the core relationship between both libraries: ACK gives users the controls to shape the chart, and Flex SDK renders the resulting configuration.