shadcn.io is not affiliated with official shadcn/ui
Dropdown Menu examples · Settings
View Options Dropdown Menu for React
A view options menu with one layout to pick, list, grid or columns, and display toggles below it.
File browsers need a grid for pictures, a list for details and columns for folders. This dropdown menu opens from an eye icon button and pairs a Layout radio group (List View, Grid View, Column View) with Display Options checkbox rows (Show Hidden Files, Compact Mode, Show Preview). It fits file managers, galleries and asset libraries.
Preview
Installation
FAQ
How does the layout choice work?
One value, grid to start, out of list, grid and columns. Picking a layout moves the check.
DropdownMenuRadioGroup takes value, and onValueChange receives the new value.
Which display rows start checked?
Only Show Preview. Show Hidden Files and Compact Mode start off, and each toggles on its own.
Why are radios and checkboxes in one menu?
The layout is one choice out of three, so it's a radio group; the display options can be on together, so they're checkbox rows. A separator and their own labels keep the two kinds apart.
What does the trigger look like?
An outline Button with size="icon-md", an eye icon and aria-label set to View options. The menu is w-56.
Related
- Theme Selector Dropdown MenuA theme picker behind a palette button
- Preferences Dropdown Dropdown MenuAn editor preferences menu of five
- Dropdown with Checkboxes Dropdown MenuA View menu of checkbox rows that show or
- Mixed Features Dropdown Dropdown MenuA File menu that mixes actions with
- Basic Button GroupThree rows of outline buttons joined into
- Default ToggleAn icon-only toggle that turns bold on