DDBS UI
section

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.json
Dependencies:lucide-react
Fullscreen
Carbon25,013
Fuel672
Power2,456
Filters
  • Harrow Fen Peatland Restoration

    United KingdomPeatland rewettingAvailable
    2018 to 2024
    524,000 t
    $18.50 /t
  • Slatewater Mineral Storage

    CanadaMineralizationAvailable
    2022 to 2025
    240,000 t
    $142.00 /t
  • Ridgeline Wind Cooperative

    MoroccoWind powerLimited
    2021 to 2026
    1,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>
  );
}