Skip to main content
Version: Next

Custom Elements (beta)

You can write code for to replace one of our default components with your custom implementation. This feature comes in handy when CSS customization is not enough to get the look you are going for. We already ship the tools required to write these custom components with the SDK, so nothing extra is required.


Let's jump right into some code:

import { IntegryJS, html } from '@integry/sdk';

const integryHandle = new IntegryJS({
userConfig: {
customComponents: {
flowCard: (props) => html`<div>${}</div>`,

To add a custom component:

  1. Add a customComponents key under the userConfig object in the SDK init config.
  2. Add a key for the component you want to customize (in this case, this is flowCard).
  3. Set your custom component as the value.

Let's take a closer look at that function definition:

(props) => html`<div>${}</div>`;

This function is passed a parameter called props, and returns a component.

  • The props parameter contains all of the information and event handlers that are available for this component
  • You consume these in a special template literal which forms the body of your custom component
  • Integry SDK will swap out the default component for this custom one when it renders

Here's a full example:

name: string;
description: string;
imgUrl: string;
tags: string;
layout: 'GRID' | 'LIST';
handleClick: () => void;
(props) => IntegryJS.html`
<img src=${props.imgUrl} alt="logo" width="40" />
<button onclick=${props.handleClick}>Setup</button>

Here's the result:


The html function that is exposed by the SDK package is powered by htm. Please visit their documentation for more information on how html works.