A clinic scheduling landing page template for 2027: drag a patient into a free slot

How our clinic scheduling software landing page template works: the practice's real week on frosted glass, a cancellation that the waitlist fills, a sticky day story and a changelog as proof.

7 min read

The real component. Click the picture to open it live and try it before you read how it was built.

A practice manager's day is a calendar with holes in it. This template lets them fill one: drag a waiting patient into a free slot on the real week.

Cancellations fill themselves

On one practitioner's Thursday, cancelling a visit strikes it out, and a moment later the first patient on the waitlist slides into the gap. The product's main promise, shown in two seconds.

src/registry/landing-pages/hale/cancel-desk.tsx

"use client";

import { useState } from "react";
import { AnimatePresence, motion } from "motion/react";
import { MessageSquare, RotateCcw, X } from "lucide-react";
import { EASE_OUT } from "@/lib/motion";
import { cn } from "@/lib/utils";
import type { CancelDesk as Desk } from "./types";

// How long after the cancellation the waitlist patient slides into the gap.
const REFILL_MS = 900;

// One practitioner's Thursday. Cancelling a visit strikes it out; a moment later the first patient on the waitlist
// slides into the gap in teal, with the text they were sent and how long it took.
export function CancelDesk({ desk }: { desk: Desk }) {
  const [cancelled, setCancelled] = useState<number | null>(null);
  const [isRefilled, setIsRefilled] = useState(false);
  const [first, ...rest] = desk.waitlist;
  const cancel = (index: number) => {
    setCancelled(index);
    window.setTimeout(() => setIsRefilled(true), REFILL_MS);
  };
  const reset = () => {
    setCancelled(null);
    setIsRefilled(false);
  };
  const gapTime = cancelled === null ? "" : desk.bookings[cancelled].time;

  return (
    <div className="grid gap-4 rounded-2xl bg-white/70 p-3 font-inter-tight ring-1 ring-white/60 backdrop-blur-xl sm:grid-cols-5 sm:p-4">
      <ol className="flex flex-col gap-1.5 rounded-xl bg-white p-3 ring-1 ring-zinc-200 sm:col-span-3">
        <li className="px-1 pb-1 text-xs text-zinc-500">{desk.day}</li>
        {desk.bookings.map((booking, index) => {
          const isGap = index === cancelled;
          return (
            <li key={booking.time} className="flex h-12 items-center gap-3 rounded-lg px-2 text-sm">
              <span className="w-11 text-xs text-zinc-400 tabular-nums">{booking.time}</span>
              <AnimatePresence mode="popLayout" initial={false}>
                {isGap && isRefilled ? (
                  <motion.span
                    key="refill"
                    layoutId="waitlist-first"
                    className="flex-1 rounded-md bg-teal-600 px-2 py-1.5 font-semibold text-white"
                  >
                    {first.patient} <span className="font-normal text-teal-100">· {first.reason}</span>
                  </motion.span>
                ) : (
                  <span
                    key="booking"
                    className={cn("flex-1 truncate", isGap ? "text-zinc-300 line-through" : "text-zinc-800")}
                  >
                    {booking.patient} <span className="text-zinc-400">· {booking.reason}</span>
                  </span>
                )}
              </AnimatePresence>
              {cancelled === null && (
                <button
                  type="button"
                  onClick={() => cancel(index)}
                  aria-label={`Cancel ${booking.patient}`}
                  className="grid size-7 place-items-center rounded-md text-zinc-400 ring-1 ring-zinc-200 outline-none hover:text-red-600 hover:ring-red-200 focus-visible:ring-2 focus-visible:ring-teal-600"
                >
                  <X aria-hidden className="size-3.5" />
                </button>
              )}
            </li>
          );
        })}
      </ol>
      <div className="flex flex-col gap-2 sm:col-span-2">
        <p className="px-1 text-xs text-zinc-500">Waitlist</p>
        {!isRefilled && (
          <motion.p layoutId="waitlist-first" className="rounded-lg bg-white px-3 py-2 text-sm ring-1 ring-zinc-200">
            {first.patient} <span className="block text-xs text-zinc-500">{first.wants}</span>
          </motion.p>
        )}
        {rest.map((patient) => (
          <p key={patient.patient} className="rounded-lg px-3 py-2 text-sm text-zinc-400 ring-1 ring-zinc-200">
            {patient.patient} <span className="block text-xs">{patient.wants}</span>
          </p>
        ))}
        <AnimatePresence>
          {isRefilled && (
            <motion.div
              initial={{ opacity: 0, y: 8 }}
              animate={{ opacity: 1, y: 0 }}
              transition={{ duration: 0.4, ease: EASE_OUT }}
              className="flex flex-col gap-2"
            >
              <p className="rounded-2xl rounded-tl-sm bg-white p-3 text-xs leading-relaxed text-zinc-700 ring-1 ring-zinc-200">
                <MessageSquare aria-hidden className="mb-1 size-3.5 text-teal-600" />
                {desk.text.replace("{time}", gapTime)}
              </p>
              <p className="px-1 text-xs font-medium text-teal-700">{desk.filledIn}</p>
              <button
                type="button"
                onClick={reset}
                className="flex items-center gap-1.5 self-start px-1 text-xs text-zinc-500 outline-none hover:text-zinc-950 focus-visible:underline"
              >
                <RotateCcw aria-hidden className="size-3" /> Try another
              </button>
            </motion.div>
          )}
        </AnimatePresence>
      </div>
    </div>
  );
}
The cancel desk

The day, told as it happens

On wide screens a sticky guide follows the reader down the page: its track fills teal as you scroll, and each step's marker is a slot that books when it is reached. On phones each step carries its own time and name.

src/registry/landing-pages/hale/day-steps.tsx

"use client";

import { AnimatePresence, motion, type MotionValue } from "motion/react";
import { usePrefersReducedMotion } from "@/hooks/use-prefers-reduced-motion";
import { EASE_OUT } from "@/lib/motion";
import { cn } from "@/lib/utils";
import type { HaleContent } from "./types";

interface DayStepsProps {
  day: HaleContent["day"];
  ids: readonly string[];
  activeIndex: number;
  // How far the reader is through the steps on the right, 0 to 1.
  progress: MotionValue<number>;
}

// The sticky guide beside the day's story. A grey track runs down the steps and fills teal as the reader scrolls;
// each step's marker is a slot that books (fills teal) once it is reached. Every step shows its time and name, and
// the one on screen opens to a line on what Hale does there.
export function DaySteps({ day, ids, activeIndex, progress }: DayStepsProps) {
  const isReduced = usePrefersReducedMotion();
  return (
    <div className="lg:sticky lg:top-28 lg:self-start">
      <h2 id="day-title" className="text-sm font-semibold text-zinc-950">
        {day.title}
      </h2>
      <ol className="relative mt-8 hidden lg:block">
        <span aria-hidden className="absolute top-3 bottom-3 left-2 w-px bg-zinc-200" />
        <motion.span
          aria-hidden
          style={{ scaleY: isReduced ? 1 : progress }}
          className="absolute top-3 bottom-3 left-2 w-px origin-top bg-teal-600"
        />
        {day.steps.map((step, index) => {
          const isReached = index <= activeIndex;
          const isActive = index === activeIndex;
          return (
            <li key={step.label} className="relative pb-10 pl-10 last:pb-0">
              <span
                aria-hidden
                className={cn(
                  "absolute top-1 left-0 size-4.5 rounded-md ring-1 transition-colors duration-500",
                  isReached ? "bg-teal-600 shadow-md shadow-teal-900/20 ring-teal-600" : "bg-white ring-zinc-300",
                )}
              />
              <a
                href={`#${ids[index]}`}
                className="block rounded-md outline-none focus-visible:ring-2 focus-visible:ring-teal-600"
              >
                <span className="block text-xs text-zinc-400 tabular-nums">{step.time}</span>
                <span
                  className={cn(
                    "mt-0.5 block text-lg font-semibold tracking-tight transition-colors duration-300",
                    isActive ? "text-zinc-950" : "text-zinc-400",
                  )}
                >
                  {step.label}
                </span>
                <AnimatePresence initial={false}>
                  {isActive && (
                    <motion.span
                      initial={{ height: 0, opacity: 0 }}
                      animate={{ height: "auto", opacity: 1 }}
                      exit={{ height: 0, opacity: 0 }}
                      transition={{ duration: 0.4, ease: EASE_OUT }}
                      className="block overflow-hidden"
                    >
                      <span className="block max-w-64 pt-1.5 text-sm text-pretty text-zinc-500">{step.detail}</span>
                    </motion.span>
                  )}
                </AnimatePresence>
              </a>
            </li>
          );
        })}
      </ol>
    </div>
  );
}
The sticky guide

Proof that the team ships

The FAQ sits beside a dated changelog drawn on a line, which draws itself down as it comes into view.

More articles