For Affiliates

Configuration

All configuration options for the Exlitem search widget — attributes, window config, and defaults.

3 min read

The widget can be configured via HTML attributes on the element, a global JavaScript object, or a combination of both.

#HTML Attributes

The simplest way to configure the widget is with attributes directly on the <exlitem-search> element:

<exlitem-search
  api-key="exl_pub_live_abc123"
  theme="dark"
  placeholder="Search for a medical expert…"
  specialty="Medical Malpractice"
></exlitem-search>

#Attribute Reference

AttributeTypeDefaultDescription
api-keystringRequired. Your publishable API key.
theme"light" | "dark" | "auto""light"Color theme. "auto" follows the user's system preference.
placeholderstring"Search expert witnesses…"Placeholder text for the search input.
specialtystringLock searches to a specific specialty (e.g. "Patent Litigation").
statestringLock searches to a specific US state (e.g. "California").
cta-textstring"View all results on Exlitem"Text for the call-to-action link below results.
cta-urlstring"https://exlitem.com/search"URL the CTA link points to.
primary-colorstring"#E8A016"Brand color for buttons and accents (any valid CSS color).

#Window Config Object

For more complex setups or when you want to configure the widget from JavaScript, use the window.ExlitemWidgetConfig object. Define it before loading the widget script:

<script>
  window.ExlitemWidgetConfig = {
    apiKey: 'exl_pub_live_abc123',
    theme: 'dark',
    placeholder: 'Search by specialty, name, or location…',
    ctaText: 'See all experts on Exlitem',
  };
</script>
<script src="https://cdn.exlitem.com/widget/exlitem-search.js"></script>

#Config Object Properties

PropertyAttribute EquivalentType
apiKeyapi-keystring
themethemestring
placeholderplaceholderstring
restrictSpecialtyspecialtystring
restrictStatestatestring
ctaTextcta-textstring
ctaUrlcta-urlstring
primaryColorprimary-colorstring
apiUrlstring (advanced: override API endpoint)

#Priority Order

When the same setting is specified in multiple places, the widget resolves values in this order (highest priority first):

  1. HTML attributes on the element
  2. window.ExlitemWidgetConfig object
  3. Built-in defaults

This means HTML attributes always win. For example, if you set theme="light" on the element but theme: "dark" in the window config, the widget will use light theme.

#Multiple Widgets

You can place multiple widgets on the same page, each with different configurations:

<exlitem-search
  api-key="exl_pub_live_abc123"
  specialty="Medical Malpractice"
  placeholder="Find a medical expert…"
></exlitem-search>

<exlitem-search
  api-key="exl_pub_live_abc123"
  specialty="Patent Litigation"
  placeholder="Find a patent expert…"
></exlitem-search>

All widgets share the same API key but can have different specialty locks, placeholders, and themes.