Black Friday: 30% off Pro

Get 30% off

Updated

Range Line

Pro

Preview

Customize

1M
Accent

Installation

Pro

Range Line 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/range-line

Usage

import { RangeLine } from "@/components/uibrik/range-line/range-line";​<RangeLine  title="Portfolio"  defaultRange="1M"  trend  accent=""  format={{ style: "currency", currency: "USD" }}  onRangeChange={(range) => {}}  // ranges={[{ value: "…", label: "…", data: [{ label: "…", value: 0 }] }]}  // range="…"/>

Where to use Range Line

  • Investment apps

    A portfolio line morphing between time ranges keeps context as users zoom.

    Pairs with Stock Chart

  • Price history

    A header that reads out any point you scrub shows the exact value and date.

  • Account balances

    One clean line suits balance and net-worth views in fintech apps.

    Pairs with Wallet Stack

Props

RangeLine
title
Type string
"Portfolio"
Names what is plotted.
defaultRange
Type "1D" | "1W" | "1M" | "3M" | "1Y"
"1M"
Range shown first.
trend
Type boolean
true
Green when the range ends up, red when down.
accent
Type string
""
Line colour when trend is off. Empty uses the chart palette.
ranges
Type { value: string; label: string; data: { label: string; value: number }[]; period?: string }[]
–
One tab per range, each with its own points, oldest first.
range
Type string
–
Range shown, when controlled.
onRangeChange
Type (range: string) => void
–
Called when a tab is picked.
format
Type Intl.NumberFormatOptions
USD currency
Formats every number, e.g. { style: "percent" }.
className
Type string
–
Classes for the outer shell.