pnpm dlx shadcn@latest add @saturation-ui/detail-toolbarTailwind v4 — Source Scanning
The public shadcn registry installs component source into your project. If Tailwind v4 isn't scanning your components directory, add this to your CSS entry file:
@source "../components";This ensures all utility classes in CVA variants and data attribute selectors are included in your build.
import {
DetailToolbar,
useCompactOnScroll,
} from "@/components/ui/detail-toolbar"const compactOn = useCompactOnScroll(scrollRef)
<DetailToolbar title="Transaction" compact={{ name: rec.merchant, amount: money(rec.amount) }}
compactOn={compactOn} onBack={goBack} onClose={close} />| Prop | Type | Default | Description |
|---|---|---|---|
title | ReactNode | — | Rest-state title (the entity type). |
compact | { name, amount? } | — | Compact identity that crossfades in on scroll. |
compactOn | boolean | false | Drive with useCompactOnScroll(scrollRef, threshold?). |
onBack / backLabel | … | — | Back chevron (hidden when absent) with contextual tooltip. |
onClose | () => void | — | Close (×) at the far right. |
actions | ReactNode | — | Inline actions between title and close. |
On This Page