- Getting Started
- The Basics
- Concepts
- SuperNative
-
EDGE Components
- Introduction
- Activity Indicator
- Badge
- Bottom Navigation
- Bottom Sheet
- Button
- Button Group
- Canvas
- Carousel
- Checkbox
- Chip
- Column
- Divider
- Gesture Area
- Icon
- Icons
- Image
- Layout & Styling
- List
- Menus
- Modal
- Pressable
- Progress Bar
- Radio Group
- Row
- Scroll View
- Select
- Shapes
- Side Navigation
- Slider
- Spacer
- Stack
- Tab Row
- Text
- Text Input
- Toggle
- Top Bar
- Virtual List
- Web View
- Plugins
- Testing
- Architecture
You're viewing pre-release documentation — version 4.x is in beta
Features, APIs and behaviour may change before the stable release. View the stable version (3.x)
Select
Overview#
A single-choice dropdown picker over a flat list of strings. On iOS, renders as a SwiftUI Menu (popover); on
Android, as an M3 ExposedDropdownMenuBox with an outlined trigger.
Per Model 3, colors and borders come from theme tokens.
Copied!
<native:select label="Country" :options="['United States', 'Canada', 'Mexico']" placeholder="Select your country" native:model="country"/>
Props#
options- Array of option strings (required, array)value- Currently selected option string (optional). Usenative:modelfor two-way bindinglabel- Label rendered above the trigger (optional, string)placeholder- Text shown when nothing is selected (optional, string)disabled- Disable the picker (optional, boolean, default:false)a11y-label- Accessibility label (optional)a11y-hint- Accessibility hint (optional)
Events#
@change- Livewire method called when the selection changes. Receives the new option string
Two-way Binding#
native:model binds the selected option to a Livewire string property:
Copied!
<native:select :options="$countries" native:model="country" />
Examples#
Country picker#
Copied!
<native:select label="Country" placeholder="Select country" :options="['Australia', 'Brazil', 'Canada', 'Germany', 'Japan', 'United Kingdom', 'United States']" native:model="country"/>
Manual handler#
Copied!
<native:select :options="['Daily', 'Weekly', 'Monthly']" :value="$cadence" @change="setCadence"/>
Element#
Copied!
use Nativephp\NativeUi\Elements\Select; Select::make() ->label('Country') ->placeholder('Select country') ->options(['Australia', 'Canada', 'United States']) ->value($country) ->onChange('setCountry');
make()- Create a selectoptions(array $options)- Option stringsvalue(string $val)- Current selectionlabel(string $text)- Label textplaceholder(string $text)- Empty-state textdisabled(bool $value = true)- Disable the pickera11yLabel(string $value),a11yHint(string $value)- AccessibilitysyncMode(string $mode)- Set bynative:modelmodifiersonChange(string $method)- Livewire method invoked on change
Plugin Dev Kit
Build native plugins with
Claude Code
Learn More
NativePHP Ultra
All NativePHP plugins, teams & priority support from
$35/mo
Learn More
The Vibes
The unofficial Laracon US
Day 3
Grab Your Spot
Only 100 tickets!
The Masterclass
Go from zero to
published app
in no time
in no time
Learn More
Early Bird Pricing