# Application Data Table: Column Visibility Table

A customers table beside a checkbox rail that shows and hides columns live, with a locked identity column and a running column count.

- Page: https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/column-visibility-table
- Collection: [Application](https://www.shadcn-ui-blocks.com/blocks/application-pro), Standard tier
- Group: [Data Tables](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables)
- Created: 2026-07-10
- Preview image: https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/column-visibility-table.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/application-pro-data-tables-column-visibility-table
```

Needs an API key from a Pro or Team plan: add `@shadcn-ui-blocks` to the registries in components.json with the key as an `Authorization: Bearer` header. Setup: https://www.shadcn-ui-blocks.com/docs/shadcn-cli. The MCP server installs it without the setup: https://www.shadcn-ui-blocks.com/docs/mcp.

## Depends on

- npm packages: class-variance-authority, lucide-react, radix-ui
- shadcn/ui components: button, checkbox, label, table
- Installs to: `@/components/blocks/application-pro/data-tables/column-visibility-table`

## About this block

Column Visibility Table is the customers list for six
accounts: Northwind Labs, Arcadia Systems, Helio Works,
Fernwood Studio, Quantum Freight, and Bluepeak Health.
A checkbox rail on the right toggles six optional
columns on and off live via useState: Plan, MRR, Seats,
Region, Created, and Last active. The Customer column
stays locked on, and the count line reads how many of
the seven total columns are currently shown.

Columns are one typed array; toggling a checkbox filters
which ones render, and Reset to default restores the
starting four. The footnote notes that column choices
persist per user, so an ops lead and a finance lead can
keep different views of the same list.

## When to use

Reach for this block whenever a table carries more
columns than any one reader needs at once and different
roles care about different fields: customer lists, issue
trackers, or reporting grids. No portal or dropdown menu
is required; the chooser sits inline beside the table.

A natural flow around it on an Application Pro page:

**Before**

- [Filters and search](https://www.shadcn-ui-blocks.com/blocks/application-pro/filters-and-search)
- [Stat cards](https://www.shadcn-ui-blocks.com/blocks/application-pro/stat-cards)

**After**

- [Dialogs](https://www.shadcn-ui-blocks.com/blocks/application-pro/dialogs)
- [Reports](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports)

## What you can display

One strong use is the customer account list. Other
togglable column sets:

- **Issue tracker.** Title stays locked, then assignee,
  priority, labels, and due date toggle per view.
- **Order history.** Order number stays locked, then
  status, total, items, and ship date toggle per view.
- **Team roster.** Member name stays locked, then role,
  team, location, and start date toggle per view.

> Tip: keep the identity column locked and out of the
> toggle list; a table where every column can vanish
> leaves readers with rows they cannot identify.

## More in Application Data Tables

- [Audit Log Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/audit-log-table)
- [Comparison Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/comparison-table)
- [Csv Preview Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/csv-preview-table)
- [Dense Data Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/dense-data-table)
- [Density Toggle Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/density-toggle-table)
- [Diff Review Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/diff-review-table)
- [Editable Cells Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/editable-cells-table)
- [Empty State Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/empty-state-table)
- [Feature Flags Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/feature-flags-table)
- [Grouped Columns Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/grouped-columns-table)
- [Grouped Rows Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/grouped-rows-table)
- [Heatmap Cells Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/heatmap-cells-table)
- [Inline Edit Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/inline-edit-table)
- [Invoices Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/invoices-table)
- [Multi Select Toolbar Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/multi-select-toolbar-table)
- [Nested Detail Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/nested-detail-table)
- [Paginated Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/paginated-table)
- [Pinned Columns Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/pinned-columns-table)
- [Row Actions Menu Blueprint](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/row-actions-menu-blueprint)
- [Search Highlight Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/search-highlight-table)
- [Selectable Bulk Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/selectable-bulk-table)
- [Sortable Header Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/sortable-header-table)
- [Sparkline Metrics Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/sparkline-metrics-table)
- [Status Summary Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/status-summary-table)
- [Sticky Footer Totals Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/sticky-footer-totals-table)
- [Sticky Header Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/sticky-header-table)
- [Table With Expandable Rows](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/table-with-expandable-rows)
- [Table With Filters](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/table-with-filters)
- [Timeline Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/timeline-table)
- [Tree Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/tree-table)
- [Users Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables/users-table)
