Bridge Training
UI Bridge

PlayerSelect

Controlled or uncontrolled field for a seat, with an optional empty option.

Import from @workspace/ui-bridge/fields/player-select.

PlayerSelect

Lists engine.constants.PLAYERS with the seat names of the Strings Provider (position.players, or position.short with labels="short"). Uncontrolled by default (DEFAULT_DEALER). allowNone adds an empty option labelled by position.none; the value is then Player | null.

import { PlayerSelect } from '@workspace/ui-bridge/fields/player-select';

<PlayerSelect value={dealer} onChange={setDealer} />
<PlayerSelect allowNone labels="short" variant="toggle" value={seat} onChange={setSeat} />

Demo

Toggle

The same field with variant="toggle": every option inline, one pressed at a time.

Props

Prop

Type

Also accepts disabled and the context override of withBridgeContext.