---
title: "Modular embedding SDK - plugins"
description: "Customize modular embedding SDK components with plugins. Control click actions, link handling, and no-data illustrations globally or per-component."
url: "https://www.metabase.com/docs/latest/embedding/sdk/plugins"
version: "65"
---

# Modular embedding SDK - plugins

> Modular embedding SDK is only available on [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans (both self-hosted and on Metabase Cloud).

The Metabase modular embedding SDK supports plugins to customize the behavior of components. These plugins can be used in a global context or on a per-component basis.

## Plugin scope

### Global plugins

To use a plugin globally, add the plugin to the `MetabaseProvider`'s `pluginsConfig` prop:

```typescript
<MetabaseProvider
  authConfig={authConfig}
  theme={theme}
  pluginsConfig={{
    mapQuestionClickActions: () => [], // Add your custom actions here
  }}
>
  {children}
</MetabaseProvider>
```

### Component plugins

To use a plugin on a per-component basis, pass the plugin as a prop to the component:

```typescript
<InteractiveQuestion
  questionId={1}
  plugins={{
    mapQuestionClickActions: () => [],
  }}
/>
```

See docs for specific components:

- [Question plugins](https://www.metabase.com/docs/latest/embedding/chart.md#customize-what-happens-when-someone-clicks-on-a-chart)
- [Dashboard plugins](https://www.metabase.com/docs/latest/embedding/dashboard.md#customize-the-menu-on-dashboard-cards-react-sdk-only)

## Global plugins

### `mapQuestionClickActions`

The plugin `mapQuestionClickActions` lets you customize what happens when people click on a data point on a dashboard or chart. `mapQuestionClickActions` can be used globally, or on component level.

See [`mapQuestionClickActions` plugin](https://www.metabase.com/docs/latest/embedding/chart.md#customize-what-happens-when-someone-clicks-on-a-chart) for more information and examples.

### `handleLink`

To customize what happens when people click a link in your embedded questions and dashboards, use the global plugin `handleLink`:

```typescript
const plugins = {
  handleLink: (urlString: string) => {
    const url = new URL(urlString, window.location.origin);
    const isInternal = url.origin === window.location.origin;
    if (isInternal) {
      // Handle internal navigation (e.g., with your router)
      console.log("Navigate to:", url.pathname + url.search + url.hash);
      return { handled: true }; // prevent default navigation
    }
    return { handled: false }; // let the SDK do the default behavior
  },
};

return (
  <MetabaseProvider authConfig={authConfig} pluginsConfig={plugins}>
    <InteractiveDashboard dashboardId={1} />
  </MetabaseProvider>
);
```

By default, links open in a new tab. Use `handleLink` to intercept link clicks — for example, to open a URL in a modal or navigate within your app using your router.

The function receives a URL string. Return `{ handled: true }` to prevent default navigation, or `{ handled: false }` to open the link in a new tab.

The plugin `handleLink` can only be used [globally](#plugin-scope) on provider level. `handleLink` is also available in [web components](https://www.metabase.com/docs/latest/embedding/config.md#web-component-plugins) via `pluginsConfig` in `defineMetabaseConfig`, with the same API.

To create clickable links in your table columns, set the column's formatting to [display as link](https://www.metabase.com/docs/latest/data-modeling/metadata/formatting.md#display-as).

### `getNoDataIllustration` and `getNoObjectIllustration`

By default, Metabase displays a sailboat image when a query returns no results. The plugins `getNoDataIllustration` and `getNoObjectIllustration` swap in an image of your own. Both can only be used [globally](#plugin-scope) on provider level.

See [Replace the no-results illustration](https://www.metabase.com/docs/latest/embedding/sdk/loading-and-errors.md#replace-the-no-results-illustration) for more information and examples.

## Further reading

- [Question plugins](https://www.metabase.com/docs/latest/embedding/chart.md#customize-what-happens-when-someone-clicks-on-a-chart)
- [Dashboard plugins](https://www.metabase.com/docs/latest/embedding/dashboard.md#customize-the-menu-on-dashboard-cards-react-sdk-only)
- [Customize loading, error, and empty states](https://www.metabase.com/docs/latest/embedding/sdk/loading-and-errors.md)
