Skip to content

[Request] selected disabled options should render as selected #648

Backlog

Description

@sacrosanctic

Is your feature request related to a problem? Please describe.
There is no way to express "this specific option must be selected" — an option that is always part of the answer and cannot be deselected.

Describe the solution you'd like
Add required?: boolean to Option:

const selected = await multiselect({
  message: 'Pick your framework features',
  options: [
    { value: 'ssr', label: 'SSR', required: true }, // pre-selected, cannot be deselected
    { value: 'ts', label: 'TypeScript' },
    { value: 'spa', label: 'SPA (disabled)', disabled: true },
  ],
});

Describe alternatives you've considered
None

Additional context

Activity

  1. added
    enhancement
    on Nov 25, 2026
  2. 43081j commented on Nov 29, 2026

    @43081j
    Collaborator

    i don't think we need a new option here. we just have a bug.

    you should set initialValues to include the one you want pre-selected, and define that specific option as disabled: true.

    that works today but doesn't render as "selected and disabled", which is a bug.

  3. changed the title [-][Request] per-option `required` for multiselect prompts[/-] [+][Request] selected disabled options should render as selected[/+] on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions