Creating a Custom Dashboard
A guide to creating a custom dashboard in Umbraco
Overview
This guide outlines the steps to set up a custom dashboard in Umbraco. Part one covers:
What is a Dashboard?
A Dashboard is a tab on the right-hand side of a section eg. the Getting Started dashboard in the Content section:

Why provide a Custom Dashboard for your editors?
It is generally considered good practice to provide a custom dashboard to welcome your editors to the backoffice of your site. You can provide information about the site and/or provide a helpful gateway to common functionality the editors will use.
This guide will show the basics of creating a custom 'Welcome Message' dashboard. The guide will also show how you can go a little further to provide interaction using Lit and TypeScript.
The finished dashboard will give the editors an overview of which pages and media files they've worked on most recently.
This tutorial uses TypeScript and Lit with Umbraco, It is expected that your package is already set up to use TypeScript and Lit.
To see how to set up an extension in Umbraco using TypeScript and Lit, read the article Creating your first extension.
Resources
This tutorial will not go in-depth on how TypeScript and Lit work. To learn about TypeScript and Lit, you can find their documentation below:
There are a lot of parallels with Creating a Property Editor. The tutorial 'Creating a Property Editor Tutorial' is worth a read too.
The end result
At the end of this guide, we will have a friendly welcoming dashboard displaying a list of the most recent site logs.
Setting up a package
Follow the Vite Package Setup by creating a new project folder called "
welcome-dashboard
" inApp_Plugins
.Create a manifest file named
umbraco-package.json
within thepublic
folder, located at the root of thewelcome-dashboard
folder. Here we define and configure our dashboard.Add the following code to
umbraco-package.json
:
{
"$schema": "../../umbraco-package-schema.json",
"name": "My.WelcomePackage",
"version": "0.1.0",
"extensions": [
{
"type": "dashboard",
"alias": "my.welcome.dashboard",
"name": "My Welcome Dashboard",
"element": "/App_Plugins/welcome-dashboard/welcome-dashboard.js",
"elementName": "my-welcome-dashboard",
"weight": 30,
"meta": {
"label": "Welcome Dashboard",
"pathname": "welcome-dashboard"
},
"conditions": [
{
"alias": "Umb.Condition.SectionAlias",
"match": "Umb.Section.Content"
}
]
}
]
}
For more information about the umbraco-package.json
file, read the article Extension Manifest. For more information about the dashboard configurations read the Dashboards article.
Creating the Dashboard Web Component
Now let's create the web component we need for our property editor. This web component contains all our HTML, CSS, and logic.
Create a file in the
src
folder with the namewelcome-dashboard.element.ts
In this new file, add the following code:
import { LitElement, css, html, customElement } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
@customElement('my-welcome-dashboard')
export class MyWelcomeDashboardElement extends UmbLitElement {
override render() {
return html`
<h1>Welcome Dashboard</h1>
<div>
<p>
This is the Backoffice. From here, you can modify the content,
media, and settings of your website.
</p>
<p>© Sample Company 20XX</p>
</div>
`;
}
static override readonly styles = [
css`
:host {
display: block;
padding: 24px;
}
`,
];
}
export default MyWelcomeDashboardElement;
declare global {
interface HTMLElementTagNameMap {
'my-welcome-dashboard': MyWelcomeDashboardElement;
}
}
In the
vite.config.ts
file update theentry
to point to our newly created.ts
file, and also ensure that theoutDir
andbase
attributes are pointing to thewelcome-dashboard
folder:
import { defineConfig } from "vite";
export default defineConfig({
build: {
lib: {
entry: "src/welcome-dashboard.element.ts", // your web component source file
formats: ["es"],
},
outDir: "../App_Plugins/welcome-dashboard", // all compiled files will be placed here
emptyOutDir: true,
sourcemap: true,
rollupOptions: {
external: [/^@umbraco/], // ignore the Umbraco Backoffice package in the build
},
},
base: "/App_Plugins/welcome-dashboard/", // the base path of the app in the browser (used for assets)
});
In the
welcome-dashboard
folder runnpm run build
and then run the project. Then in the content section of the Backoffice you will see our new dashboard:

Going Further
With all the steps completed, you should have a dashboard welcoming your users to the Backoffice.
In the next part, we will look into how to add localization to the dashboard using our own custom translations.
Last updated
Was this helpful?