← All blocks

Data table with bulk actions

data-table · bulk-actions · data-table-bulk-actions

npx shadcn@latest add @plus-ui/data-table-bulk-actions

Default content

{
  "eyebrow": "pellora",
  "title": "Deployments",
  "description": "Every build across production, staging and preview environments.",
  "actions": [
    {
      "label": "New deploy",
      "href": "#deploy",
      "variant": "primary"
    }
  ],
  "search": {
    "label": "Search deployments",
    "placeholder": "Search service, commit or SHA"
  },
  "facets": {
    "status": "Status",
    "environment": "Environment",
    "reset": "Reset"
  },
  "statusLabels": {
    "ready": "Ready",
    "building": "Building",
    "queued": "Queued",
    "failed": "Failed",
    "canceled": "Canceled"
  },
  "columns": {
    "deployment": "Deployment",
    "status": "Status",
    "environment": "Environment",
    "author": "Author",
    "duration": "Duration",
    "created": "Created",
    "actions": "Actions"
  },
  "rowActions": [
    "View logs",
    "Promote to production",
    "Redeploy",
    "Copy URL"
  ],
  "rows": [
    {
      "id": "dpl_8fK2qz",
      "service": "checkout-api",
      "commit": "Retry idempotent payment captures on 502",
      "sha": "a41f9c2",
      "branch": "main",
      "environment": "production",
      "status": "building",
      "author": {
        "name": "Ines Varga",
        "avatar": {
          "src": "https://images.unsplash.com/photo-1494790108377-be9c29b29330?auto=format&fit=crop&crop=faces&w=96&h=96&q=80",
          "alt": "Ines Varga"
        }
      },
      "duration": "1m 12s",
      "durationSeconds": 72,
      "created": "just now",
      "createdMinutesAgo": 0
    },
    {
      "id": "dpl_8fK1wd",
      "service": "edge-cache",
      "commit": "Raise stale-while-revalidate to 120s for /catalog",
      "sha": "7be03d1",
      "branch": "main",
      "environment": "production",
      "status": "ready",
      "author": {
        "name": "Tomás Rieder",
        "avatar": {
          "src": "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?auto=format&fit=crop&crop=faces&w=96&h=96&q=80",
          "alt": "Tomás Rieder"
        }
      },
      "duration": "48s",
      "durationSeconds": 48,
      "created": "6 min ago",
      "createdMinutesAgo": 6
    },
    {
      "id": "dpl_8fJz0p",
      "service": "web-storefront",
      "commit": "Lazy-load reviews carousel below the fold",
      "sha": "c90e4b7",
      "branch": "perf/reviews",
      "environment": "preview",
      "status": "ready",
      "author": {
        "name": "Aiko Brandt",
        "avatar": {
          "src": "https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&crop=faces&w=96&h=96&q=80",
          "alt": "Aiko Brandt"
        }
      },
      "duration": "2m 03s",
      "durationSeconds": 123,
      "created": "21 min ago",
      "createdMinutesAgo": 21
    },
    {
      "id": "dpl_8fJx7m",
      "service": "search-indexer",
      "commit": "Bump tokenizer to 4.2 and rebuild synonyms",
      "sha": "e12aa58",
      "branch": "main",
      "environment": "staging",
      "status": "failed",
      "author": {
        "name": "Kwame Asante",
        "avatar": {
          "src": "https://images.unsplash.com/photo-1560250097-0b93528c311a?auto=format&fit=crop&crop=faces&w=96&h=96&q=80",
          "alt": "Kwame Asante"
        }
      },
      "duration": "3m 41s",
      "durationSeconds": 221,
      "created": "38 min ago",
      "createdMinutesAgo": 38
    },
    {
      "id": "dpl_8fJv3c",
      "service": "auth-gateway",
      "commit": "Rotate session signing key",
      "sha": "5d7c3f0",
      "branch": "main",
      "environment": "production",
      "status": "ready",
      "author": {
        "name": "Mira Castell",
        "avatar": {
          "src": "https://images.unsplash.com/photo-1580489944761-15a19d654956?auto=format&fit=crop&crop=faces&w=96&h=96&q=80",
          "alt": "Mira Castell"
        }
      },
      "duration": "56s",
      "durationSeconds": 56,
      "created": "1 h ago",
      "createdMinutesAgo": 64
    },
    {
      "id": "dpl_8fJt9a",
      "service": "image-proxy",
      "commit": "Serve AVIF to clients that accept it",
      "sha": "f3b81e6",
      "branch": "feat/avif",
      "environment": "preview",
      "status": "queued",
      "author": {
        "name": "Tomás Rieder",
        "avatar": {
          "src": "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?auto=format&fit=crop&crop=faces&w=96&h=96&q=80",
          "alt": "Tomás Rieder"
        }
      },
      "duration": "—",
      "durationSeconds": 0,
      "created": "1 h ago",
      "createdMinutesAgo": 71
    },
    {
      "id": "dpl_8fJr2k",
      "service": "notifications-svc",
      "commit": "Batch order emails per 30s window",
      "sha": "09cd2a4",
      "branch": "main",
      "environment": "staging",
      "status": "ready",
      "author": {
        "name": "Ines Varga",
        "avatar": {
          "src": "https://images.unsplash.com/photo-1494790108377-be9c29b29330?auto=format&fit=crop&crop=faces&w=96&h=96&q=80",
          "alt": "Ines Varga"
        }
      },
      "duration": "1m 34s",
      "durationSeconds": 94,
      "created": "2 h ago",
      "createdMinutesAgo": 118
    },
    {
      "id": "dpl_8fJp5e",
      "service": "checkout-api",
      "commit": "Add tax provider timeout metric",
      "sha": "b7a6e13",
      "branch": "obs/tax-timeouts",
      "environment": "preview",
      "status": "canceled",
      "author": {
        "name": "Kwame Asante",
        "avatar": {
          "src": "https://images.unsplash.com/photo-1560250097-0b93528c311a?auto=format&fit=crop&crop=faces&w=96&h=96&q=80",
          "alt": "Kwame Asante"
        }
      },
      "duration": "31s",
      "durationSeconds": 31,
      "created": "2 h ago",
      "createdMinutesAgo": 140
    },
    {
      "id": "dpl_8fJn8u",
      "service": "web-storefront",
      "commit": "Bump Next.js to 16.0.3",
      "sha": "4e2f7c9",
      "branch": "deps/next-16-0-3",
      "environment": "preview",
      "status": "failed",
      "author": {
        "name": "deploy-bot"
      },
      "duration": "2m 48s",
      "durationSeconds": 168,
      "created": "3 h ago",
      "createdMinutesAgo": 185
    },
    {
      "id": "dpl_8fJm1t",
      "service": "billing-worker",
      "commit": "Reconcile refunds against ledger nightly",
      "sha": "d58e0b2",
      "branch": "main",
      "environment": "production",
      "status": "ready",
      "author": {
        "name": "Mira Castell",
        "avatar": {
          "src": "https://images.unsplash.com/photo-1580489944761-15a19d654956?auto=format&fit=crop&crop=faces&w=96&h=96&q=80",
          "alt": "Mira Castell"
        }
      },
      "duration": "1m 27s",
      "durationSeconds": 87,
      "created": "4 h ago",
      "createdMinutesAgo": 240
    },
    {
      "id": "dpl_8fJk4r",
      "service": "edge-cache",
      "commit": "Purge on catalog publish webhook",
      "sha": "62c1a9f",
      "branch": "main",
      "environment": "staging",
      "status": "ready",
      "author": {
        "name": "Aiko Brandt",
        "avatar": {
          "src": "https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&crop=faces&w=96&h=96&q=80",
          "alt": "Aiko Brandt"
        }
      },
      "duration": "45s",
      "durationSeconds": 45,
      "created": "5 h ago",
      "createdMinutesAgo": 302
    },
    {
      "id": "dpl_8fJh6y",
      "service": "search-indexer",
      "commit": "Shard index by locale",
      "sha": "8a3d5f1",
      "branch": "feat/locale-shards",
      "environment": "preview",
      "status": "ready",
      "author": {
        "name": "Kwame Asante",
        "avatar": {
          "src": "https://images.unsplash.com/photo-1560250097-0b93528c311a?auto=format&fit=crop&crop=faces&w=96&h=96&q=80",
          "alt": "Kwame Asante"
        }
      },
      "duration": "4m 16s",
      "durationSeconds": 256,
      "created": "6 h ago",
      "createdMinutesAgo": 377
    },
    {
      "id": "dpl_8fJf0b",
      "service": "auth-gateway",
      "commit": "Enforce SameSite=Lax on refresh cookie",
      "sha": "1c9e4d7",
      "branch": "main",
      "environment": "staging",
      "status": "ready",
      "author": {
        "name": "Mira Castell",
        "avatar": {
          "src": "https://images.unsplash.com/photo-1580489944761-15a19d654956?auto=format&fit=crop&crop=faces&w=96&h=96&q=80",
          "alt": "Mira Castell"
        }
      },
      "duration": "1m 01s",
      "durationSeconds": 61,
      "created": "8 h ago",
      "createdMinutesAgo": 455
    },
    {
      "id": "dpl_8fJd3n",
      "service": "web-storefront",
      "commit": "Prefetch PDP data on hover",
      "sha": "a0b6c3e",
      "branch": "main",
      "environment": "production",
      "status": "ready",
      "author": {
        "name": "Aiko Brandt",
        "avatar": {
          "src": "https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&crop=faces&w=96&h=96&q=80",
          "alt": "Aiko Brandt"
        }
      },
      "duration": "2m 11s",
      "durationSeconds": 131,
      "created": "10 h ago",
      "createdMinutesAgo": 610
    }
  ],
  "pagination": {
    "pageSize": 8,
    "summary": "{from}–{to} of {total}",
    "previous": "Previous",
    "next": "Next"
  },
  "empty": {
    "title": "No deployments match",
    "description": "Try a different search, or clear the status and environment filters."
  },
  "selection": {
    "summary": "{count} selected",
    "selectAll": "Select all on this page",
    "selectRow": "Select deployment",
    "clear": "Clear",
    "initial": [
      "dpl_8fJx7m",
      "dpl_8fJt9a",
      "dpl_8fJp5e"
    ],
    "actions": [
      {
        "label": "Redeploy",
        "icon": "rollback",
        "destructive": false
      },
      {
        "label": "Promote",
        "icon": "rocket",
        "destructive": false
      },
      {
        "label": "Cancel builds",
        "icon": "ban",
        "destructive": true
      }
    ]
  }
}