Comparison Bar Card

This period vs last as paired bars: a segmented control slides a pill between Week, Month and Year while bars re-grow on a spring, and hovering or focusing a pair lifts it with both values.

Try it: Switch the range (← → in the control); hover or Tab the bars.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/comparison-bar-card.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/comparison-bar-card. You can also copy the source into components/ui/comparison-bar-card.tsx (view on GitHub).

Usage

import { ComparisonBarCard } from '@/components/ui/comparison-bar-card'

Props

Component props
PropTypeDefaultNotes
rangesRecord<string, ComparisonSeries[]>Week / Month / Year{ label, current, previous }
defaultRangestring'Week'Starting range.
title / currencystringRevenue / ' Header and currency.
classNamestring—Extra classes merged onto the root.

Dependencies

  • motion
  • lucide-react
  • Smart Widget Stack

    An iOS-style widget stack: the top widget sits at full size with the next ones peeking above; scroll, swipe vertically, use ↑ ↓ or the side dots to flip through on a damped spring while content…

  • Goal Progress Card

    A savings goal with a liquid progress bar: topping up springs the fill forward under a moving sheen, milestone ticks light as they pass and reaching the goal morphs the button into a check.

  • Glow Candle Card

    An ink “Sales Report” card with monospaced rolling numerals, a neon delta and a glowing candlestick chart: candles grow from their midpoints, new ones stream in live and a crosshair shows OHLC on…

  • Crypto Ticker Row

    A watchlist with live prices: each tick flashes the price green or red and fades back, mini sparklines morph to the new history and every row is a labelled button.

  • Glow Level Card

    The ink stat card with segmented neon level meters: segments light left to right with a bloom, levels re-balance live, and hovering or focusing a row reveals its channel and share.

  • Wallet Balance Card

    A fanned stack of payment cards: picking one springs it to the front while the rest tuck behind, the balance rolls to the new amount and an eye toggle blurs the figures.

See all 13 Data Widgets components