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.
Choose a field and direction from one compact menu.
<SortMenu
fields={[
{ id: "createdAt", label: "Created" },
{ id: "name", label: "Name" },
{ id: "status", label: "Status" },
]}
defaultValue={{ field: "createdAt", direction: "desc" }}
/>import { SortMenu } from "@froggdesign/enter-ui-react";<SortMenu
fields={fields}
value={sort}
onValueChange={setSort}
/>Place SortMenu in a DataToolbar next to search, density, saved views, and column visibility controls.
The field and direction groups use radio menu items, so selected state is announced by assistive technology. Clear sort returns undefined through onValueChange.
fields: { id, label }[].value: controlled { field, direction }.defaultValue: initial sort value.onValueChange: called with a sort value or undefined.disabled: disables the trigger.SortMenu uses .eui-sort-menu classes and FroggDesign tokens for layout, state, focus, and disabled styling.