Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.
React Context Menu - Table Sort Menu
A React context menu for table column sorting with ascending, descending, and clear sort options for data tables and spreadsheets
Looking to implement shadcn/ui patterns?
Join our Discord community for help from other developers.
Clicking column headers for sorting feels old school. This React context menu brings right-click sorting to table headers with ascending, descending, and clear options. Built with shadcn/ui and Radix UI with Lucide React directional icons—perfect for data tables, admin dashboards, or spreadsheet applications where users need flexible sorting control.
Pattern created by @haydenbleasel
Installation
Related patterns you will also like
Table Filter Menu
Filter operations with condition submenus
Table Row Operations Menu
Insert, duplicate, and delete row operations
Table Column Operations Menu
Show, hide, move, and resize column operations
Table Export Menu
Export data to CSV, Excel, PDF, JSON
Context Menu with Separators
Similar separator grouping pattern
Dropdown Menu
Alternative click-triggered menu
Questions you might have
React Context Menu with Submenus
A React context menu with nested submenus for sharing via email (Gmail, Outlook, Yahoo) and messaging (WhatsApp, Telegram, Slack) platforms
React Context Menu - Table Filter Menu
A React context menu for table filtering with nested filter conditions (contains, equals, starts with, ends with) and clear filters for data tables