Skip to content

Bar Race

A ranking that moves through time. Values glide between periods, bars re-rank on springs as they pass each other, the numbers at the bar ends count along and the period rolls in the corner.

$149 once · every Pro piece

Customize

An overtake ignites: the bar that moves up flashes in the accent and cools over about a second, so who passed whom stays readable. Underneath, a play / pause button and a timeline you can drag, or step with the arrow keys (Space plays). Point at a bar, or step through the ranks with the arrow keys, to follow that entry: it stays bright while the others step back, wherever the race takes it.

Install

npx shadcn@latest add @obsyde/bar-race

Needs your licence key · Get Pro

Usage

Import it from where the CLI puts it, or copy the files below by hand.

import { BarRace } from '@/components/obsyde/ember/bar-race/BarRace';

export function Example() {
  return (
    <BarRace />
  );
}

Files

What you get with Pro: plain React, TypeScript and CSS, with no dependencies.

  • ember/bar-race/BarRace.tsxcomponent
  • ember/bar-race/bar-race.cssstyles
  • ember/bar-race/BarRaceDemo.tsxdemo
  • ember/viz-kit/viz-kit.cssshared
  • ember/viz-kit/Tooltip.tsxshared
  • ember/viz-kit/focus.tsshared
  • ember/viz-kit/patterns.tsxshared
  • ember/viz-kit/roll.tsshared
  • ember/shared/rolling-number.cssshared
  • ember/shared/spring.tsshared
  • ember/shared/accent.tsshared
  • ember/viz-kit/scale.tsshared
  • ember/viz-kit/motion.tsshared
  • ember/viz-kit/chart.tsxshared
  • ember/shared/ember.cssshared
  • ember/viz-kit/touch.tsshared
  • ember/viz-kit/keyboard.tsshared
  • ember/viz-kit/size.tsshared
  • ember/viz-kit/States.tsxshared
  • ember/viz-kit/shape.tsshared
  • ember/viz-kit/marks.tsxshared
  • ember/viz-kit/demo.tsxshared
  • ember/viz-kit/demo.cssshared

API

PropTypeDefault
accentAccent'ember' | 'volt' | 'arc''ember'
topBars shownnumber8
entriesEntriesnumber10
periodPeriodnumber12
autoplayAutoplaybooleanfalse
patternPattern'none' | 'diagonal-up' | 'diagonal-down' | 'dots' | 'vertical' | 'crosshatch''none'
backgroundBackground'grid' | 'none''grid'
statusStatus'ready' | 'loading' | 'empty''ready'
seedSeednumber7