Documentation menu
Getting Started
Components
Primitives
- Agent Thinking
- Alert
- Alert Dialog
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Checkbox
- Command
- Command Palette
- Context Menu
- Data Table
- Dialog
- Dropdown Menu
- Empty
- Field
- Glow Cloud
- Input
- Label
- Medication Schedule
- Period Tabs
- Popover
- Rainbow Button
- Scroll Area
- Select
- Selectable Card
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Tag
- Textarea
- Timeline
- Tooltip
- Use Count Up
Charts and metrics
Patterns
- Confirm Button
- Date Picker
- Embedded
- Empty State
- Entity Drawer
- Error Boundary
- Field Row
- File Dropzone
- Form Dialog
- Kv
- List Editor
- List Page
- Live Time
- Mini Table
- Money
- Note Field
- Note Text
- Page Card
- Page Header
- Page Tabs
- Page Toolbar
- Person Cell
- Picture Field
- Print Card
- Range Switcher
- Row Actions
- Search Input
- Search Select
- Selected Box
- Signature Pad
- Status Badge
- Sub Nav Layout
- Suggest Input
- Tab Icons
- Table Footer
- Theme Accent Picker
- Time Picker
- View All Link
Dashboard cards
Advanced
Device frames
Website widgets
Website screens
Website panels
Patterns
Page Toolbar
The filter row above a table, with pill filters.
import { useState } from "react"
import { Download } from "lucide-react"
import { Button } from "@/registry/vcare/ui/button"
import { FilterSelect, PageToolbar } from "@/registry/vcare/ui/page-toolbar"
import { SearchInput } from "@/registry/vcare/ui/search-input"
export default function PageToolbarDemo() {
const [q, setQ] = useState("")
const [status, setStatus] = useState("")
return (
<div className="w-full rounded-xl border bg-card">
<PageToolbar actions={<Button variant="outline" size="sm"><Download /> Export</Button>}>
<SearchInput value={q} onChange={setQ} placeholder="Search invoices" />
<FilterSelect label="Status" value={status} onChange={setStatus} allLabel="All" options={[{ value: "paid", label: "Paid" }, { value: "due", label: "Due" }]} />
</PageToolbar>
</div>
)
}Installation
npx shadcn@latest add @vcare/page-toolbarOr install directly from the URL: https://ui.vcarehms.com/r/page-toolbar.json
- Install the dependencies:
npm i lucide-react - Add the registry items it uses: select.
- Copy this file into your project and change the
@/registry/vcare/…imports to your own paths.
components/ui/page-toolbar.tsx
import type { ReactNode } from 'react';
import { ChevronDown } from 'lucide-react';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/registry/vcare/ui/select';
/** Raised pill "Label │ value ▾" filter (reference: "Sort by │ Pipeline Value"). Value '' means "all". */
export function FilterSelect({
label,
value,
onChange,
options,
allLabel,
}: {
label: string;
value: string;
onChange: (v: string) => void;
options: { value: string; label: string }[];
allLabel: string;
}) {
const ALL = '__all__';
return (
<div className="flex h-control shrink-0 items-center overflow-hidden rounded-full bg-secondary text-xs shadow-raised transition-[background-color] duration-150 ease-power3-out hover:bg-muted">
<span className="px-[9px] text-subtle">{label}</span>
<span aria-hidden className="h-full w-px bg-divider" />
<Select value={value || ALL} onValueChange={(v) => onChange(v === ALL ? '' : v)}>
<SelectTrigger
className="h-full gap-1.5 rounded-none border-0 bg-transparent px-[9px] text-xs font-medium shadow-none focus-visible:ring-0 [&>svg:last-child]:hidden"
data-size="sm"
>
<SelectValue />
<ChevronDown className="size-3 text-[#898b8d]" />
</SelectTrigger>
<SelectContent>
<SelectItem value={ALL}>{allLabel}</SelectItem>
{options.map((o) => (
<SelectItem key={o.value} value={o.value}>
{o.label}
</SelectItem>
))}
</SelectContent>
</Select>
</div>
);
}
export function PageToolbar({ children, actions }: { children?: ReactNode; actions?: ReactNode }) {
return (
<div className="flex flex-wrap items-center justify-between gap-2 border-b px-3 py-3 sm:px-4">
<div data-tour="page-filters" className="flex min-w-0 basis-full flex-wrap items-center gap-2 sm:flex-1 sm:basis-0">{children}</div>
{actions && <div data-tour="page-toolbar-actions" className="ms-auto flex shrink-0 flex-wrap items-center gap-2">
{actions}
</div>}
</div>
);
}Usage
import { FilterSelect, PageToolbar } from "@/components/ui/page-toolbar"Exports
FilterSelect, PageToolbar
Dependencies
lucide-react@^1.80.0(npm)@vcare/select(registry)
Raw item: /r/page-toolbar.json