Workspace Preview
A product preview window for a catalog or marketplace app: header tabs, big counters, a search box, a category filter and a result list that really filters as you type.
npx shadcn@latest add https://ui.develop-better-solutions.com/r/workspace-preview.jsonDependencies:
lucide-reactECExample Co
Carbon25,013
Fuel672
Power2,456
Filters
Name
Vintage
Amount
Price
Harrow Fen Peatland Restoration
United KingdomPeatland rewettingAvailable2018 to 2024524,000 t$18.50 /tSlatewater Mineral Storage
CanadaMineralizationAvailable2022 to 2025240,000 t$142.00 /tRidgeline Wind Cooperative
MoroccoWind powerLimited2021 to 20261,200,000 t$6.40 /t
Usage
workspace-preview-example.tsx
import { WorkspacePreview } from "@dbs/ui";
export default function WorkspacePreviewExample() {
return (
<div className="bg-[#0b2b32] p-4 sm:p-8">
<WorkspacePreview
tabs={["Purchase", "Source", "Manage"]}
workspaceName="Example Co"
metrics={[{ label: "Carbon", count: "25,013" }, { label: "Fuel", count: "672" }, { label: "Power", count: "2,456" }]}
categories={["All", "Removal", "Avoidance", "Renewable"]}
columns={["Vintage", "Amount", "Price"]}
searchPlaceholder="Search by project or method"
rows={[
{ id: "1", title: "Harrow Fen Peatland Restoration", facts: ["United Kingdom", "Peatland rewetting"], status: "ok", statusLabel: "Available", category: "Avoidance", values: ["2018 to 2024", "524,000 t", "$18.50 /t"] },
{ id: "2", title: "Slatewater Mineral Storage", facts: ["Canada", "Mineralization"], status: "ok", statusLabel: "Available", category: "Removal", values: ["2022 to 2025", "240,000 t", "$142.00 /t"] },
{ id: "3", title: "Ridgeline Wind Cooperative", facts: ["Morocco", "Wind power"], status: "pending", statusLabel: "Limited", category: "Renewable", values: ["2021 to 2026", "1,200,000 t", "$6.40 /t"] },
]}
/>
</div>
);
}