thedaviddias/ux-patterns-for-developers

selection-input

Use when you need to choose from predefined options.

First seen Mar 23, 2026

Installation

$ npx skills add thedaviddias/ux-patterns-for-developers --skill selection-input

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from thedaviddias/ux-patterns-for-developers · top by installs.

npx skills add thedaviddias/ux-patterns-for-developers

Browse all from thedaviddias/ux-patterns-for-developers

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 240
Default branch main
Open issues 1
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

More metadata
id
selection-input
category
forms
pattern
Selection Input
source
uxpatterns.dev
url
https://uxpatterns.dev/patterns/forms/selection-input
sourcePath
apps/web/content/patterns/forms/selection-input.mdx

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,570 B
  • docs SUMMARY.md 75 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 13 installs

SKILL.md

Selection Input

Choose from predefined options

What it solves

A selection input is a form control that allows users to choose one option from a predefined list of options. The selected option is typically displayed in a single-line text field, with the list of options hidden until the user interacts with the control.

When to use

  • When users need to select a single option from a list of predefined choices
  • When the list of options is relatively short (less than 10-15 items)
  • When screen space is limited, and displaying all options at once is not feasible
  • When the selected option doesn't need to be visible at all times

When to avoid

  • When users need to select multiple options (use checkboxes or a [multi-select](/patterns/forms/multi-select-input) instead)
  • When the list of options is very long (consider using an [autocomplete](/patterns/forms/autocomplete) or a typeahead)
  • When users need to input free-form text (use a regular text input instead)
  • When the options are complex or require additional information or visual aids

Implementation workflow

  1. Confirm the pattern matches the problem and constraints before copying the example.
  2. Start from the anatomy and examples in references/pattern.md, then choose the smallest viable variation.
  3. Apply accessibility, performance, and interaction guardrails before layering visual polish.
  4. Use the testing guidance to verify behavior across keyboard, screen reader, responsive, and failure scenarios.

Accessibility guardrails

  • Use a visible label connected to the control via for/id.
  • Prefer native <select> for simple cases to inherit built-in accessibility.
  • Provide group labels for long lists (<optgroup>) and descriptive helper text when needed.
  • Keep focus indicators highly visible and maintain sufficient text/background contrast.
  • Announce validation and error states using aria-invalid and aria-describedby.

Related patterns


For full implementation detail, examples, and testing notes, see references/pattern.md.

Pattern page: https://uxpatterns.dev/patterns/forms/selection-input