Components/FlatSelect
Since 2.4.7BETA

FlatSelect

ComboBox-style dropdown selector (`TxFlatSelect` + `TxFlatSelectItem`). Options overlay the trigger, selected item anchors at trigger position, smooth clip-path expand/collapse animation.

This page was migrated by AI, please review carefully

Migration is complete, but please validate against source code and manual review.

FlatSelect

ComboBox-style dropdown selector (TxFlatSelect + TxFlatSelectItem). When clicked, the options list overlays the trigger with the selected item anchored at the trigger position. Uses clip-path for smooth expand/collapse animation.

Basic Usage

Click the trigger — the dropdown expands outward from the selected item position. The selected item displays a checkmark.

FlatSelect (basic)

Demo loads on client.

Disabled State

Supports both group-level and item-level disabling.

FlatSelect (disabled)

Demo loads on client.

Comparison with TxSelect

FeatureTxSelectTxFlatSelect
Positioningfloating-ui (Teleport to body)CSS absolute + clip-path
Expand effectDropdown appears below triggerComboBox: options overlay trigger, expand from selected item
AnimationNone (avoids scroll lag)Smooth clip-path expand/collapse
SearchSupportedNot supported
Use caseGeneral purpose, complex formsSettings pages, simple dropdowns
TriggerInput-style with iconButton-style with arrow

API

TxFlatSelect

Props

PropDescriptionTypeDefault
modelValue / v-modelBound valuestring | number''
placeholderPlaceholder textstring''
disabledDisable the selectorbooleanfalse

Events

EventDescriptionParams
update:modelValueEmitted when value updates(value: string | number) => void
changeEmitted when value changes(value: string | number) => void

Slots

SlotDescription
defaultTxFlatSelectItem children

TxFlatSelectItem

Props

PropDescriptionTypeDefault
valueItem valuestring | number-
labelDisplay textstring-
disabledDisable this itembooleanfalse

Slots

SlotDescription
defaultCustom content (overrides label)
Was this helpful?