Skip to content

Select

uitemplate

single-item dropdown selector

Installation

$ bunx termuijs add select

Copies the source into src/components/select/ and installs @termuijs/core, @termuijs/widgets.

Usage

ts
import { Select } from '@termuijs/ui'
ts
new Select(options: SelectOption[], config: SelectOptions = {}, style?: Partial<Style>)

API Reference

Select

PropTypeRequiredDescription
placeholderstringoptional
activeColorStyle['fg']optional
onSelect(option: SelectOption, index: number) => voidoptional
#template#select