A value by day, written in each bar, today lit, the average dashed.
Every shadcn style · one file
v2.0 · Updated Oct 13pnpm dlx shadcn@latest add https://notchset.dev/r/week-bars.jsonpnpm dlx shadcn@latest add https://notchset.dev/r/week-bars.jsonFree, no account or key. One command for every shadcn style. With the @notchset registry added, @notchset/<name> works too.
Works with React 18.3 or 19 on Tailwind CSS v4, in any shadcn project. What's tested
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Import it and pass your content. The props that matter most are listed next.
"use client";
import { WeekBars } from "@/components/ui/notchset/week-bars";
const W: [string, number, string][] = [["Mon", 7.07, "7:04"], ["Tue", 6.37, "6:22"], ["Wed", 7.3, "7:18"], ["Thu", 6.68, "6:41"], ["Fri", 6.2, "6:12"], ["Sat", 7.42, "7:25"], ["Sun", 6.95, "6:57"]];
export default function WeekBarsDemo() {
return (
<div className="max-w-[560px]">
<WeekBars label="Sleep this week, Mon 19 to Sun 25 October" bars={W.map(([label, value, text]) => ({ label, value, text }))} avg={6.85} avgText="6 h 51" floor={4} />
</div>
);
}components/ui/notchset/week-bars.tsx
bars–
WeekBar[]Required.
label–
stringwhat and when, for the chart's name
avg–
number | nullthe period's average, drawn dashed
avgText–
stringtodaybars.length - 1
numberthe bar that's today (default: the last)
height168
numberfloor0
numberthe floor the bars stand on (sleep reads from 4 h, not 0)
goal–
numbera goal to clear, drawn as a quiet solid line with its words in a gutter at its right end ("70% goal")
goalText–
stringceiling–
numberthe ceiling of the scale (time in range reads to 100%); left out, the tallest bar
labelEvery1
numberwrite every nth day's label under the bars (a month or a year of bars); the table keeps them all
Give your coding assistant the Markdown guide instead of screenshots.
https://notchset.dev/api/mcp (setup)v2.0.0 · 2026-10-13
Released with the Notchset system.
The same file, at work in a finished app. Open it live and find it on its pages.