Stop Rebuilding UI

Shadcn.io is not affiliated with official shadcn/ui

Data Table with Column Visibility

A React data table with column visibility toggle using TanStack Table VisibilityState and shadcn/ui DropdownMenuCheckboxItem controls

Wide tables overwhelm small screens—column visibility lets users customize what they see. This React data table uses TanStack Table's VisibilityState with DropdownMenu containing DropdownMenuCheckboxItem for each toggleable column. Built with shadcn/ui components featuring ChevronDownIcon trigger and capitalize styling. The visibility pattern improves focus—perfect for responsive designs, dense datasets, customizable reports, or anywhere users need to hide irrelevant columns adapting table layout to their specific workflow and screen constraints.

Data Table with Column Visibility preview

Scroll to load preview

Installation

FAQ

Was this page helpful?

Sign in to leave feedback.