---
title: "Create a dashboard builder | Grafana Labs"
description: "Instantiate a DashboardBuilder with title, UID, tags, refresh interval, and time range."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Create a dashboard builder

The starting point for every SDK dashboard is the `DashboardBuilder`. You create one with a title, then chain configuration methods to set properties like UID, tags, refresh interval, and time range.

To create your dashboard builder, complete the following steps:

## Go

1. Open `main.go` and add the following code:
   
   Go ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```go
   package main
   
   import (
     "encoding/json"
     "log"
     "os"
   
     "github.com/grafana/grafana-foundation-sdk/go/cog"
     "github.com/grafana/grafana-foundation-sdk/go/common"
     "github.com/grafana/grafana-foundation-sdk/go/dashboard"
   )
   
   func main() {
     builder := dashboard.NewDashboardBuilder("My SDK Dashboard").
       Uid("my-sdk-dashboard").
       Tags([]string{"generated", "foundation-sdk"}).
       Refresh("5m").
       Time("now-1h", "now").
       Timezone(common.TimeZoneBrowser)
   }
   ```

## TypeScript

1. Open `index.ts` and add the following code:
   
   typescript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```typescript
   import { DashboardBuilder } from '@grafana/grafana-foundation-sdk/dashboard';
   
   const builder = new DashboardBuilder('My SDK Dashboard')
     .uid('my-sdk-dashboard')
     .tags(['generated', 'foundation-sdk'])
     .refresh('5m')
     .time({ from: 'now-1h', to: 'now' })
     .timezone('browser');
   ```

## What each method does

Expand table

| Method                  | Purpose                                                                                    |
|-------------------------|--------------------------------------------------------------------------------------------|
| `Uid` / `uid`           | A stable identifier. Same UID means “update existing dashboard,” not “create a duplicate.” |
| `Tags` / `tags`         | Labels for filtering dashboards in the UI. Useful for identifying code-generated ones.     |
| `Refresh` / `refresh`   | How often the dashboard auto-refreshes when open.                                          |
| `Time` / `time`         | The default time range displayed when the dashboard loads.                                 |
| `Timezone` / `timezone` | Which timezone the dashboard uses for displaying times.                                    |

In the next milestone, you add panels with data queries to your dashboard.
