About
A daily medication schedule grouped by time with a day timeline, animated check-offs, an adherence ring, pending and taken filters, next-dose hint, undoable mark-all, refill top-up and a compact add-medication form.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Medication Schedule to your project and fits it to your theme.
Code
How Medication Schedule is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
/**
* PrequelUI Animate — MIT — https://prequeluianimate.terravidhal.me
*/
import { MedicationSchedule, type Medication } from "@/components/ui/medication-schedule";
const MEDICATIONS: Medication[] = [
{
id: "m1",
name: "Amlodipine",
dose: "5 mg",
times: ["08:00"],
instructions: "Take with water after breakfast.",
refillLeft: 12,
color: "#0ea5e9",
},
{
id: "m2",
name: "Metformin",
dose: "500 mg",
times: ["08:00", "19:00"],
instructions: "Take with food to reduce stomach upset.",
refillLeft: 3,
color: "#8b5cf6",
},
{
id: "m3",
name: "Vitamin D",
dose: "1000 IU",
times: ["12:30"],
instructions: "Take with the midday meal.",
refillLeft: 26,
color: "#f59e0b",
},
{
id: "m4",
name: "Ibuprofen",
dose: "200 mg",
times: ["12:30", "20:00"],
instructions: "Only as needed for pain. Do not exceed two doses.",
refillLeft: 8,
color: "#10b981",
},
{
id: "m5",
name: "Magnesium",
dose: "200 mg",
times: ["21:30"],
instructions: "Take before bedtime.",
refillLeft: 2,
color: "#f43f5e",
},
];
const TAKEN: Record<string, boolean> = {
"m1-08:00": true,
"m2-08:00": true,
"m4-20:00": false,
};
export default function MedicationScheduleDemo() {
return (
<main className="flex min-h-screen w-full items-start justify-center bg-gradient-to-b from-muted/40 via-background to-background px-4 py-8 sm:px-6">
<MedicationSchedule
dayLabel="Tuesday, 11 February"
now="10:30"
medications={MEDICATIONS}
initialTaken={TAKEN}
title="Daily medication plan"
/>
</main>
);
}








