Overview
Interface X is a Vue.js component library for building powerful commerce search and discovery experiences. This guide will walk you through installing and configuring Interface X in your project.Requirements
Interface X requires Node.js 22+ and npm 10+ to run.
- Node.js: Version 22 or higher
- Package Manager: npm 10+, pnpm 9.15.9+, or yarn
- Vue.js: Version 3.5.28 or compatible
Installation
Install the core X Components package using your preferred package manager:Peer Dependencies
Interface X requires the following peer dependencies to be installed in your project:package.json
Optional Packages
Depending on your search backend, you may need additional adapter packages:Search API Adapters
Empathy Platform Adapter
Empathy Platform Adapter
For connecting to the Empathy Platform API:This adapter is pre-configured to work with Empathy’s search endpoints and provides out-of-the-box integration.
Custom API Adapter
Custom API Adapter
For connecting to any other search API (Elasticsearch, Solr, etc.):The base adapter package allows you to create custom adapters for any search API. See the adapter documentation for implementation details.
Design System (Optional)
The Interface X Design System (XDS) is a Tailwind CSS plugin for styling your components.
Basic Setup
Once installed, initialize Interface X in your Vue.js application:Import and configure XInstaller
Create a new file for your Interface X setup (e.g.,
src/x-setup.ts):src/x-setup.ts
Initialize with snippet configuration
Initialize Interface X with your search configuration:
src/main.ts
Configuration Options
TheSnippetConfig object accepts the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
instance | string | Yes | Your search instance identifier |
lang | string | Yes | Language code (e.g., ‘en’, ‘es’, ‘fr’) |
env | string | Yes | Environment (‘production’, ‘staging’, ‘development’) |
scope | string | Yes | Search scope or catalog identifier |
currency | string | No | Currency code (e.g., ‘USD’, ‘EUR’) |
consent | boolean | No | User consent for tracking |
uiLang | string | No | UI language (if different from search language) |
documentDirection | 'ltr' | 'rtl' | No | Document text direction |
Verify Installation
To verify Interface X is properly installed and configured, check your browser console for the global Interface X API:init(), setSnippetConfig(), and event bus functionality.
Next Steps
Quickstart Guide
Build your first search interface in minutes
Component Reference
Explore all available X Components
API Adapters
Configure your search backend connection
Design System
Customize the look and feel with XDS
Troubleshooting
Module not found errors
Module not found errors
If you encounter module resolution errors:
- Ensure all peer dependencies are installed
- Clear your
node_modulesand lock file - Reinstall dependencies:
npm install(orpnpm install --frozen-lockfile) - Check that your Node.js version is 22 or higher
Vue version conflicts
Vue version conflicts
Interface X requires Vue 3.5.28+. If you have an older version:Ensure no other packages in your project are depending on Vue 2.x.
TypeScript configuration
TypeScript configuration
If you’re using TypeScript, ensure your
tsconfig.json includes:Need help? Check out the GitHub repository or the full documentation.
