Skip to main content

Page last updated 28 July 2026

Insytful AI Search is styled entirely through CSS custom properties (--insytful-*). No build step, no CSS-in-JS — set them once and they cascade into the widget's Shadow DOM automatically.

How to apply

Web Component — set them on .insytful-root inside the theme attribute:

HTML
<insytful-search
  theme="
    .insytful-root {
      --insytful-brand-primary: #6d28d9;
      --insytful-btn-icon-search-bg-default: #6d28d9;
      --insytful-modal-radius: 12px;
    }
  "
  ...
>

React — set them on your theme file on .insytful-root (they pierce the Shadow DOM automatically):

JavaScript
.insytful-root {
  --insytful-brand-primary: #6d28d9;
  --insytful-btn-icon-search-bg-default: #6d28d9;
  --insytful-modal-radius: 12px;
}

Or pass a theme string directly to Root, the same way the Web Component does:

tsx
<InsytfulSearch.Root
  theme={`
    .insytful-root {
      --insytful-brand-primary: #6d28d9;
      --insytful-btn-icon-search-bg-default: #6d28d9;
      --insytful-modal-radius: 12px;
    }
  `}
  ...
>

What you'll typically customise

GoalVariables
Match your brand color--insytful-brand-primary, --insytful-btn-icon-search-bg-default, --insytful-semantic-focus-ring
Match your typeface--insytful-font-family, --insytful-base-font-size
Reshape the dialog--insytful-modal-max-width, --insytful-modal-radius, --insytful-modal-bg
Switch to a corner widget--insytful-widget-width, --insytful-widget-height, --insytful-widget-radius (requires variant="widget")
Restyle suggestion chips--insytful-btn-prompt-bg-default, --insytful-btn-prompt-bg-hover, --insytful-btn-prompt-radius
Restyle the error state--insytful-callout-error-bg, --insytful-callout-error-border, --insytful-callout-error-cta-bg

That covers most rebrand work. There are ~50 variables in total, grouped by component below — every token, its default, and what it controls.

Two things worth knowing

  • One focus-ring token governs the whole widget. Set --insytful-semantic-focus-ring once and every focusable element (input, buttons, links, chips) picks it up — no per-component focus styling needed.
  • --insytful-base-font-size scales all AI-response prose. Headings, paragraphs, lists, and code blocks are sized in em against this one variable, so overriding it rescales the whole response block proportionally.

For anything not covered by a variable, both platforms accept a raw theme CSS string injected into the Shadow DOM.

Full CSS variable reference

Every variable below ships with the default shown

Typography

VariableDefaultNotes
--insytful-font-familysystem-ui, -apple-system, sans-serifBase font stack for the whole widget
--insytful-base-font-size1remBase size for AI-response prose

Text colors

VariableDefaultNotes
--insytful-text-default#333333Body text, headings
--insytful-text-muted#6c6c6cSecondary text
--insytful-text-link-default#1d70b8Links in AI response markdown
--insytful-text-link-hover#184b76Link hover state
--insytful-typing-indicator-textvar(--insytful-text-muted)"Thinking…" indicator text
--insytful-disclaimer-textvar(--insytful-text-muted)Disclaimer footer text

Brand

VariableDefaultNotes
--insytful-brand-primary#195491Blockquote accent border in AI responses

Modal surface

VariableDefaultNotes
--insytful-modal-bg#ffffffDialog background
--insytful-modal-max-width784pxDialog max width
--insytful-modal-radius0pxDialog corner radius

Widget surface (variant="widget" only)

VariableDefaultNotes
--insytful-widget-width380pxPanel width
--insytful-widget-height600pxPanel height
--insytful-widget-inset-bottom24pxDistance from bottom of viewport
--insytful-widget-inset-right24pxDistance from right of viewport
--insytful-widget-radius16pxPanel corner radius
--insytful-widget-shadow0px 12px 40px rgba(0, 0, 0, 0.16)Panel drop shadow

Suggestion chips

VariableDefaultNotes
--insytful-btn-prompt-bg-default#e2eefaChip background
--insytful-btn-prompt-bg-hover#c8daecChip hover background
--insytful-btn-prompt-text#333333Chip text
--insytful-btn-prompt-radius12pxChip corner radius
--insytful-btn-prompt-focusvar(--insytful-semantic-focus-ring)Chip focus ring color

Input card

VariableDefaultNotes
--insytful-input-card-bg#ffffffInput card background
--insytful-input-card-radius16pxInput card corner radius
--insytful-input-card-bordervar(--insytful-semantic-search-field-stroke)Input card border color
--insytful-input-card-border-width1pxInput card border width

Send button

VariableDefaultNotes
--insytful-btn-icon-search-bg-default#2e3339Send button background
--insytful-btn-icon-search-bg-hover#3c444dSend button hover background
--insytful-btn-icon-search-bg-disabled#e7e7e7Send button disabled background
--insytful-btn-icon-search-icon#ffffffSend button icon color

Close button

VariableDefaultNotes
--insytful-btn-close-bgtransparentClose button background
--insytful-btn-close-bg-hover#f2f2f2Close button hover background
--insytful-btn-close-iconvar(--insytful-text-default)Close button icon color
--insytful-btn-close-size40pxClose button width/height

Skeleton loader

VariableDefaultNotes
--insytful-skeleton-bg#e8e8e8Loading bar background
--insytful-skeleton-shimmerlinear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent)Shimmer sweep gradient

Error callout

VariableDefaultNotes
--insytful-callout-error-border#d93025Callout border
--insytful-callout-error-bg#fce8e6Callout background
--insytful-callout-error-text#333333Callout body text
--insytful-callout-error-cta-bg#2e3339"Try classic?" CTA button background
--insytful-callout-error-cta-text#ffffffCTA button text
--insytful-callout-error-cta-border-radius4pxCTA button corner radius

Search field & focus ring

VariableDefaultNotes
--insytful-semantic-search-field-stroke#333333Input card border color
--insytful-semantic-search-field-ai-gradient-start#35d2c5AI-mode input halo gradient start
--insytful-semantic-search-field-ai-gradient-end#1d70b8AI-mode input halo gradient end
--insytful-semantic-focus-ringvar(--insytful-semantic-search-field-focus)Single library-wide token governing every focus ring
--insytful-semantic-search-field-focus#35d2c5Deprecated alias — prefer --insytful-semantic-focus-ring

Transitions

VariableDefaultNotes
--insytful-search-transition-duration200msSkeleton fade / dialog mode-switch duration
--insytful-search-transition-easingeaseTransition easing function

Layering

VariableDefaultNotes
--insytful-z-index999Dialog stacking order (fallback value; only set if it collides with something on your page)

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Insytful community on Slack or raise a support ticket to get help from our team.
New support request