Black Friday: 30% off Pro

Get 30% off

Updated

Flame Graph

Pro

Preview

Customize

Color
Native colour
Hot functions5
Width620px

Installation

Pro

Flame Graph is a Pro component

Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.

Install with a key

  1. Add the Pro registry to components.json:
    components.json
    {
      "registries": {
        "@uibrik-pro": {
          "url": "https://uibrik.com/r/pro/{name}.json",
          "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" }
        }
      }
    }
  2. Put your key in .env.local and add that file to .gitignore:
    .env.local
    UIBRIK_LICENSE=your-license-key
  3. Install it:
    Terminal
    npx shadcn@latest add @uibrik-pro/flame-graph

Usage

import { FlameGraph } from "@/components/uibrik/flame-graph/flame-graph";​<FlameGraph  title="Profile"  color="#e5484d"  nativeColor="#3e63dd"  hotCount={5}  width={620}  unit="ms"  onZoom={(path) => {}}  // profile={{ name: "…" }}/>

Where to use Flame Graph

  • Developer tools and profilers

    The slowest path reads at a glance, and a click narrows the graph to it without losing the callers above.

    Pairs with Request Waterfall and Stack Trace

  • Observability and APM dashboards

    Self-time ranking next to the graph answers what to optimise first.

    Pairs with Status Dashboard

  • Performance reports and PR checks

    Pass a profile from a trace and readers can explore it in the page instead of opening DevTools.

Props

FlameGraph
title
Type string
"Profile"
Heading above the graph.
color
Type string
"#e5484d"
Accent for app frames. Hotter frames take more of it.
nativeColor
Type string
"#3e63dd"
Second hue, for native frames.
hotCount
Type number
5
How many functions the self-time list shows. 0 hides it.
width
Type number
620
Width of the card; never wider than its container.
profile
Type { name: string; file?: string; self?: number; kind?: "app" | "lib" | "native"; children?: FlameFrame[] }
–
The root frame. Each frame's width is its own time plus its children's.
unit
Type string
"ms"
Unit the self times are in.
onZoom
Type (path: string[]) => void
–
Called when a frame is zoomed, with the names from the root down.
className
Type string
–
Classes for the wrapper.