> ## Documentation Index
> Fetch the complete documentation index at: https://docsv4.mile.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Widget Templates

> Save a custom widget as a template your whole organization can add to any dashboard, and edit or delete templates from the Custom tab.

A **widget template** is a custom widget saved for reuse. Everyone in your organization sees it in the **Custom** tab of the **Add** dialog and can add it to any dashboard. When you add a template, the dashboard gets its own **copy**. Later changes to the template, including deleting it, never change widgets that are already on a dashboard.

<Note>
  Required permission:

  * Add dashboard (to save a widget as a template, including the template a widget from **Create widget** becomes)
  * Edit dashboard (to edit a template)
  * Delete dashboard (to delete a template)
</Note>

## Widgets from Create widget

A widget you build with [**Create widget**](/pages/analytics/dashboard/custom-widget) is saved as a widget template the moment you click **Add to dashboard**, before the dashboard is saved. The template belongs to your organization, not to the dashboard: it stays even if you click **Discard**. The widget on the dashboard is its own copy once you save the dashboard, so changing one never changes the other.

Without the Add dashboard permission, **Create widget** and **Save as widget template** are still shown; clicking them says *You don't have permission*. The same goes for **Edit widget template** without Edit dashboard and **Delete widget template** without Delete dashboard.

## Save a widget as a template

You can save a **custom** widget: one you built with **Create widget**, or one you added from a template. Ready-made widgets from the catalog, text and banner widgets cannot be saved as templates.

A widget you build with **Create widget** is already a template the moment you add it. See [Custom Widget](/pages/analytics/dashboard/custom-widget#create-a-widget).

1. Open the dashboard. You can do this while viewing it or in edit mode.
2. Click the widget's **⋯**, then **Save as widget template**.

<div align="center">
  <img src="https://mintcdn.com/mileappv4/54VlBCEroADJ829D/images/v4/analytics/widget-save-as-template.png?fit=max&auto=format&n=54VlBCEroADJ829D&q=85&s=d60673ab9768491d8ccc228a6f25a27b" alt="Save as widget template" width="600" data-path="images/v4/analytics/widget-save-as-template.png" />
</div>

<p><em>A custom widget's ⋯ menu while viewing the dashboard, with Save as widget template.</em></p>

3. Check the **Template name**. It starts as the widget's name and can be up to 200 characters. Names do not have to be unique.
4. Optionally change the **Description**, up to 500 characters.
5. Click **Save**.

The dialog also shows the widget's visual and what it counts, so you can see what will be copied. Saving a template does not change the widget or the dashboard. The template keeps the widget's filters, including any **Task type** filter.

* **While viewing**, the template copies the widget as it was last saved.
* **In edit mode**, the template copies the widget as it is now, including a widget you have just added or changed and not saved yet. The dashboard itself stays unsaved: click **Save** or **Discard** for it as usual. If a task type in the widget's **Task type** filter no longer exists, the template is not saved and the dialog stays open.

**Save** is always available. If the name is empty when you click it, nothing is saved and the dialog says *A template needs a name.*

## Add a template to a dashboard

1. Open the dashboard and click **Edit**.
2. Click **Add** and open the **Custom** tab. Templates are listed after **Create widget**. You can also find one by name with **Search widgets**.
3. Click the template. Each template tile shows its visual, plus its task type when the template is filtered to exactly one, for example *Table · Delivery*. A template with no task type, or with several, shows its visual only, for example *Table*.

The new widget is a copy of the template. Save the dashboard to keep it. The **Add** dialog loads the list each time it opens, so a template a colleague has just saved is already there.

## Edit a template

1. In the **Custom** tab of the **Add** dialog, click the template's **⋯**, then **Edit widget template**.
2. Change the **Template name**, the description, what the widget counts or its visual, then click **Save**.

<div align="center">
  <img src="https://mintcdn.com/mileappv4/54VlBCEroADJ829D/images/v4/analytics/widget-template-menu.png?fit=max&auto=format&n=54VlBCEroADJ829D&q=85&s=e9865a7de03c349e411c11fdacc34b87" alt="Widget template menu" width="600" data-path="images/v4/analytics/widget-template-menu.png" />
</div>

<p><em>A widget template in the Custom tab, with its ⋯ menu: Edit widget template and Delete widget template.</em></p>

The dialog opens on the template's saved visual, and you can change its **Task type** filter like any other filter. Its preview uses the dashboard date range only, not the filters of the dashboard you have open, because a template is used on many dashboards: *Preview uses the dashboard date range only.*

The change applies to the template only. Widgets already on dashboards keep their own copy. After saving, you return to the **Add** dialog.

## Delete a template

1. In the **Custom** tab of the **Add** dialog, click the template's **⋯**, then **Delete widget template**.
2. Click **Delete** to confirm.

The template is removed from the **Custom** tab for everyone in your organization. Widgets already added to dashboards are not affected. This cannot be undone.

If someone else deleted the template while you had it open, you see *This widget no longer exists.* and it disappears from the list.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.