About
A small segmented control for switching a chart or card between periods like week, month, and year. It is a thin layer over shadcn's Tabs, with an optional animated pill.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Period Tabs to your project and fits it to your theme.
Code
How Period Tabs is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client"
import * as React from "react"
import { PeriodTabs } from "@/components/ui/dashboardcn-period-tabs"
export default function PeriodTabsDemo() {
const [period, setPeriod] = React.useState("month")
return (
<div className="flex flex-col items-center gap-3">
<PeriodTabs value={period} onValueChange={setPeriod} />
<span className="text-muted-foreground text-sm">Showing: {period}</span>
</div>
)
}
















