· javascript

A select should tell you something


When designing forms, the content within a select element can communicate much more than just a label. Five before-and-after examples illustrate how options can convey necessary decision-making details.

It is important to note that browsers do not yet support these customizable selects; therefore, the "after" demonstrations appear as standard dropdowns. Visitors viewing these in unsupported browsers will see the same ordinary selects. To observe the intended difference, one must open the page using Chrome or Edge.

The significant evolution is not merely aesthetic but functional: an option can now contain rich data—a preview, a number, a job title, or a warning—instead of being limited to a single line of plain text. This shift moves users from deliberation to immediate recognition.

For instance, a font picker traditionally forces users to guess based on a name, requiring them to select, view the result, and then select again. When each option displays its typeface, the option itself serves as the preview, allowing judgment based on shape rather than nomenclature. This pattern echoes functionality seen in tools like Figma and Google Docs, achievable with a simple inline style per option.

Time zone pickers often present an offset, like "(GMT+09:00) Tokyo," which is rarely the intuitive value. By displaying the current time alongside each city, along with whether it is day or night, the selection process becomes self-explanatory. This specific demonstration requires JavaScript because the times are sourced from Intl.DateTimeFormat.

When comparing delivery options, standard radio buttons can become prose when options accumulate multiple facts. A select element, however, allows these facts to be presented in aligned columns, transforming a reading task into a quick scan across a single field.

To differentiate individuals, such as two colleagues sharing a name, adding department and title beneath the name in the select turns two identical options into distinct choices. The closed control retains this title information, ensuring clarity for anyone reviewing the form.

Some options carry inherent consequences, such as needing approval. In a standard select, this is discovered only after submission. By marking these options in the list, the required attention—like "needs approval"—is visible while the user is actively choosing.

A key trade-off involves mobile usage. A native select triggers the operating system's picker, which is familiar and optimized for thumbs. A customizable select renders its own list on the page. Developers can manage this by opting into the custom appearance only when a mouse or trackpad is present, allowing touch devices to retain their native picker.

Ultimately, customizable select functionality embodies progressive enhancement; if a browser lacks support, it gracefully falls back to a regular native select, preserving the form's value submission. A crucial best practice remains: the text within every option must be fully intelligible on its own, such as "Ahmed Mostafa, Accountant · Finance," avoiding fragmented data.

Related coverage

Also worth reading

  1. next.js 16.5.0-canary.35 released
  2. next.js 16.5.0-canary.33 released
  3. angular 22.2.4 released
  4. LibreOffice's 'no AI' stance meets LLM-assisted code
  5. “Urgency is an inherently subjective call”: Anthropic tells TNS how it grades Claude Duet