Floating UI Collage
A split section: copy and a CTA on the left; a portrait on the right with frosted-glass product-UI cards the caller anchors over it with a preset. Harvested from Good Life Meds.
npx shadcn@latest add https://ui.develop-better-solutions.com/r/floating-ui-collage.jsonUses:resilient-image
Medical support,on your terms.
Medical review, 100% online
Licensed professionals review your intake form to make sure your treatment is right for you and gives you the best chance at your goals.
Find your treatment
Weight loss
165 lbs
Inbox · Dr. Rivera
PhysicianYour refill window is coming up. Let us know if anything needs updating.
Tirzepatide+
4 week subscription
Status: In transit
Usage
floating-ui-collage-example.tsx
import { FloatingUiCollage } from "@dbs/ui";
import { CheckCircle2 } from "lucide-react";
const cards = [
{
anchor: "top-left" as const,
content: (
<div className="flex items-center gap-4">
<div>
<p className="text-[11px] text-ink-muted">Weight loss</p>
<p className="text-lg font-medium text-ink">165 lbs</p>
</div>
<span className="bg-ink px-2 py-1 text-[11px] text-canvas">-17%</span>
</div>
),
},
{
anchor: "mid-left" as const,
content: (
<div className="w-56 text-left">
<div className="flex items-center justify-between border-b border-ink/10 pb-2">
<p className="text-xs font-medium text-ink">Inbox · Dr. Rivera</p>
<span className="text-[10px] text-primary">Physician</span>
</div>
<p className="mt-2 text-xs leading-relaxed text-ink-muted">
Your refill window is coming up. Let us know if anything needs updating.
</p>
</div>
),
},
{
anchor: "bottom-right" as const,
content: (
<div className="flex items-center gap-3 text-left">
<div>
<div className="flex items-center gap-1.5">
<h4 className="text-sm font-medium text-ink">Tirzepatide+</h4>
<CheckCircle2 className="size-3.5 text-primary" />
</div>
<p className="text-[11px] text-ink-muted">4 week subscription</p>
<p className="text-[11px] font-medium text-primary">Status: In transit</p>
</div>
</div>
),
},
];
export default function FloatingUiCollageExample() {
return (
<FloatingUiCollage
title={
<>
Medical support,
<span className="block">on your terms.</span>
</>
}
label="Medical review, 100% online"
description="Licensed professionals review your intake form to make sure your treatment is right for you and gives you the best chance at your goals."
action={{ label: "Find your treatment", href: "#" }}
image="/samples/patient-portrait.jpg"
imageAlt="Patient smiling while holding a phone"
cards={cards}
/>
);
}