EnterUI
DocsComponentsThemesExamplesDonation
Get Started
      • ColumnVisibilityMenu
      • SortMenu
      • DensityToggle
      • SavedViews
      • FilterBuilder

Default usage

  1. EnterUI
  2. /Docs
  3. /Data and Analytics
  4. /Tables and Data
  5. /Table Controls
  6. /SortMenu
Updated 3 October 2026

SortMenu

Dropdown control for choosing a sort field and direction.

SortMenu standardizes list and table sorting controls while keeping the table implementation responsible for applying the actual sort.

#Default usage

Sort records

Choose a field and direction from one compact menu.

Code
<SortMenu
  fields={[
    { id: "createdAt", label: "Created" },
    { id: "name", label: "Name" },
    { id: "status", label: "Status" },
  ]}
  defaultValue={{ field: "createdAt", direction: "desc" }}
/>

#Import

Code
import { SortMenu } from "@froggdesign/enter-ui-react";

#Controlled

Code
<SortMenu
  fields={fields}
  value={sort}
  onValueChange={setSort}
/>

#Patterns

Place SortMenu in a DataToolbar next to search, density, saved views, and column visibility controls.

#Accessibility

The field and direction groups use radio menu items, so selected state is announced by assistive technology. Clear sort returns undefined through onValueChange.

#API

  • fields: { id, label }[].
  • value: controlled { field, direction }.
  • defaultValue: initial sort value.
  • onValueChange: called with a sort value or undefined.
  • disabled: disables the trigger.

#Styling

SortMenu uses .eui-sort-menu classes and FroggDesign tokens for layout, state, focus, and disabled styling.

PreviousColumnVisibilityMenu
NextDensityToggle
On this page
  • Default usage
  • Import
  • Controlled
  • Patterns
  • Accessibility
  • API
  • Styling