Theming
Built-in Themes
ArionTalk ships with two built-in themes using a neutral gray/black/white palette:
- Light (default) — clean white background with dark text
- Dark — dark zinc background with light text
<!-- Light theme (default) --><ariontalk-widget theme="light"></ariontalk-widget>
<!-- Dark theme --><ariontalk-widget theme="dark"></ariontalk-widget>CSS Custom Properties
All colors and design tokens flow through --at-* CSS custom properties. Override any of them to customize the look.
| Property | Light Default | Dark Default | Description |
|---|---|---|---|
--at-primary-color | #111827 | #FAFAFA | Brand accent color |
--at-primary-text | #FFFFFF | #18181B | Text on accent backgrounds |
--at-primary-ui | var(--at-primary-color) | var(--at-primary-color) | Button fill for FAB, primary actions, active segments, and slider fill |
--at-on-primary-ui | var(--at-primary-text) | var(--at-primary-text) | Text and icon color on --at-primary-ui |
--at-fab-bg | var(--at-primary-ui) | var(--at-primary-ui) | Voice button background. Use it to style the button apart from other primary actions |
--at-fab-text | var(--at-on-primary-ui) | var(--at-on-primary-ui) | Voice button icon and label |
--at-fab-border | none | none | Voice button border |
--at-logo-color | var(--at-primary-color) | var(--at-primary-color) | ArionTalk logo in the panel header |
--at-text-color | #1F2937 | #FAFAFA | Primary text |
--at-text-secondary | #6B7280 | #A1A1AA | Medium emphasis text |
--at-text-muted | #9CA3AF | #71717A | Low emphasis text |
--at-bg-color | #FFFFFF | #18181B | Panel backgrounds |
--at-surface-color | #F3F4F6 | #27272A | Button / chip backgrounds |
--at-surface-hover | #E5E7EB | #3F3F46 | Hover states |
--at-border-color | #D1D5DB | #3F3F46 | Input borders, progress tracks |
--at-divider-color | rgba(127, 127, 127, 0.14) | rgba(255, 255, 255, 0.07) | Header divider line |
--at-border-radius | 16px | 16px | Panel border radius |
--at-font-family | system-ui, sans-serif | system-ui, sans-serif | Font stack |
--at-shadow-color | rgba(0,0,0,0.12) | rgba(0,0,0,0.4) | Box shadows |
--at-shadow-hover | rgba(0,0,0,0.18) | rgba(0,0,0,0.5) | Hover shadows |
--at-focus-ring | rgba(17,24,39,0.2) | rgba(250,250,250,0.25) | Focus outlines |
--at-success-color | #10B981 | #34D399 | Success accent |
--at-error-color | #DC2626 | #F87171 | Error accent |
--at-error-hover | #B91C1C | #EF4444 | Error hover accent |
--at-state-listening | var(--at-primary-color) | var(--at-primary-color) | Listening indicator dot |
--at-state-voice | #DB7609 | #F89B29 | Voice-detected indicator accent |
--at-state-thinking | #FF0F7B | #FF0F7B | Thinking indicator dots |
--at-state-speaking | #FF0F7B | #FF0F7B | Speaking waveform bars |
--at-state-muted | #6B7280 | #A1A1AA | Muted indicator, active mute button, and badge |
--at-state-error | #DC2626 | #F87171 | Error icon, badge, and End button icon |
--at-caption-label | #4B5563 | #A1A1AA | ”You” label in the user transcript pill |
--at-voice-deep | #DB7609 | #E8850F | Visitor-speaking wave inner radial stop |
--at-voice-mid | #F89B29 | #F89B29 | Visitor-speaking wave outer radial stop |
--at-voice-light | #FFC46B | #FFD08A | Visitor-speaking wave highlight |
--at-voice-rim-a | #FF0F7B | #FF0F7B | Visitor-speaking wave rim start |
--at-voice-rim-b | #FFD166 | #FFD166 | Visitor-speaking wave rim end |
--at-dur-fast | 120ms | 120ms | Fast transition duration |
--at-dur-base | 200ms | 200ms | Standard transition duration |
--at-dur-slow | 320ms | 320ms | Entrance transition duration |
--at-ease-standard | cubic-bezier(0.2, 0, 0, 1) | cubic-bezier(0.2, 0, 0, 1) | Standard easing curve |
--at-ease-enter | cubic-bezier(0, 0, 0, 1) | cubic-bezier(0, 0, 0, 1) | Entrance easing curve |
--at-ease-exit | cubic-bezier(0.3, 0, 1, 1) | cubic-bezier(0.3, 0, 1, 1) | Exit easing curve |
Highlight Colors
Interactive highlights are drawn on your page, outside the widget, so set their tokens on the page (for example on :root), not on ariontalk-widget.
| Property | Default | Description |
|---|---|---|
--at-highlight-color | --at-primary-color if it’s set on the page, otherwise rgba(99, 102, 241, 0.6) | Side borders of highlighted sections and the outline of highlighted images |
--at-highlight-bg | rgba(99, 102, 241, 0.08) | Background of highlighted sections |
:root { --at-highlight-color: #0EA5E9; --at-highlight-bg: rgba(14, 165, 233, 0.1);}Highlighted elements get the ariontalk-highlight class while the highlight is shown.
Custom Theming Examples
Full Custom Theme
Override any --at-* property via CSS — no special theme attribute value needed:
ariontalk-widget { --at-primary-color: #7C3AED; --at-primary-text: #FFFFFF; --at-bg-color: #1A1A2E; --at-text-color: #E0E0E0; --at-surface-color: #16213E; --at-surface-hover: #0F3460; --at-border-color: #533483;}Partial Override
Change just the accent color while keeping everything else from the built-in theme:
ariontalk-widget { --at-primary-color: #7C3AED; --at-primary-text: #FFFFFF;}Dark Base with Custom Accent
Combine CSS overrides with theme="dark" to use dark as a base and tweak specific tokens:
<ariontalk-widget theme="dark"></ariontalk-widget>ariontalk-widget { --at-primary-color: #F59E0B; --at-primary-text: #18181B; --at-success-color: #22D3EE;}How Shadow DOM Theming Works
ArionTalk uses Shadow DOM for style encapsulation. The widget’s internal styles define CSS custom properties on the :host selector with default values for each theme.
When you set --at-* properties on the ariontalk-widget element from your external CSS, those values take precedence over the :host() rules inside the Shadow DOM. This is standard CSS custom property inheritance — the external declaration wins because it is closer to the element in the cascade.
This means you can always override any token without needing to pierce the Shadow DOM or use ::part selectors.
Matching Host Page Theme
To sync the widget with your site’s theme toggle, set the theme attribute dynamically:
const widget = document.querySelector('ariontalk-widget');
// React to your own theme togglefunction onThemeChange(isDark) { widget.setAttribute('theme', isDark ? 'dark' : 'light');}If your site switches themes by overriding --at-* tokens (for example under a [data-theme="dark"] selector), set the theme attribute too. Tokens you don’t override then use their dark defaults instead of the light ones.
Or use CSS custom properties that your site already defines:
ariontalk-widget { --at-primary-color: var(--your-brand-color); --at-bg-color: var(--your-bg-color); --at-text-color: var(--your-text-color);}