Skip to content
UX Atlas
PatternCraft conventionFoundational

Sorting

Reordering a set, where the default order is the decision that matters most.

Definition

Sorting arranges results by an attribute. Because most users never change it, the default sort is one of the highest-impact defaults in any product.

Craft convention. True because the industry converged on it. Breaking it costs familiarity, not correctness.

On this page
  1. Definition
  2. Getting it right
  3. In practice
  4. Continue from here

Getting it right

  • Choose the default that answers the most common question, not the one that is cheapest to compute.
  • Show the current sort explicitly, including direction.
  • Make the direction indicator unambiguous. Arrow conventions vary, so pair the icon with text where space allows.
  • Handle ties deterministically with a secondary key, or the order will shuffle between page loads.
  • In tables, make column headers sortable and announce the sort state with aria-sort.
  • Preserve sort state across pagination and navigation.

In practice

Unstable sort ordering

Data tables

Sorting by a column with many equal values without a tiebreaker makes rows jump between page loads. Users read this as a bug and lose confidence in the data.

Each link says what the connection is, so you can tell a principle from an alternative from a thing people mix this up with.

Principles behind this

The reasoning this solution is an application of.

Often used with

These usually appear in the same screen or the same decision.