Form

Select

Dropdown select with search and custom options.

Available inreactangular

Preview

Live previewreal component

No tool selected

Install

TerminalBash
npx mcp-elements add select

Usage

select-example.tsxTSX
import { Select } from '@mcp-elements/react'

export function Example() {
  return (
    <Select
      placeholder="Choose a tool"
      options={[
        { value: 'search_code', label: 'search_code' },
        { value: 'create_issue', label: 'create_issue' },
        { value: 'run_query', label: 'run_query', disabled: true },
      ]}
      onChange={(value) => console.log(value)}
    />
  )
}

Props

PropTypeDefaultDescription
options *SelectOption[]List of selectable options ({ value, label, disabled? })
placeholderstring'Select...'Text shown when no option is selected
onChange(value: string) => voidCalled with the value when a selection is made
classNamestringAdditional classes for the select container