A chip showing the current value, and a caret that opens a menu of the others.
7 days
rest
North paddock
accent
Custom range
disabled
<WildDropdownPill label="Range" value="7 days" />
Show the value, not the field name. “7 days” says what the bar is showing; the label goes to screen readers.
Selected
The pill fills in blue while its menu is open and once it holds anything but the default. The chosen row in the menu wears the same fill, so the choice reads as one object.
24 hours
24 hours
7 days
30 days
Season to date
Custom rangeNeeds a paid plan
Hover the chosen row and it steps one shade darker. Keyboard focus on it adds a white inner ring.
Accessibility
The pill is a button that says whether its menu is open. Opening it moves focus to the chosen row, and closing it returns focus to the pill.
Disabled dims the trigger to 40% and locks its chips.
none
some
all
disabled
Content
Name the items in placeholder and allItemsLabel when they aren’t sites.
Keep labels short. Long ones end in an ellipsis.
Accessibility
The trigger announces the summary it shows. Each tree row announces its level and whether it’s checked, unchecked or mixed.
Key
What it does
Enter / Space
On the trigger, opens or closes the panel. On Select all or a row, ticks or clears every site it covers.
Tab
Moves through search, Select all and the tree. Tabbing out closes the panel.
↓ / ↑
Moves between visible rows, and ↓ from the search into the tree.
→
Opens a client or group, or moves to its first child.
←
Closes a client or group, or moves to its parent.
Home / End
First or last visible row.
Escape
Closes the panel and returns focus to the trigger.
Props
Prop
Type
Default
Description
nodes
TreeNode[]
—
{ id, label, children? }, nested to any depth.
v-model
SelectionOutput
—
The ticked sites: { mode, selectedNodeIds, selectedLeafIds }.
placeholder
string
'Select sites...'
Trigger text when nothing is selected.
allItemsLabel
string
'All Sites'
Select-all row, and the trigger when all are selected.
size
'sm' | 'md' | 'lg'
'sm'
Trigger height: 36, 40 or 44px.
showChips
boolean
true
Shows the chips under the trigger.
maxHeight
number
400
Height cap on the whole panel, in px.
disabled
boolean
false
Dims the trigger and locks its chips.
virtualized
boolean
false
Reserved for long lists. Has no effect yet.
@change
(value: SelectionOutput) => void
—
Fires with the new selection on every tick.
@open / @close
() => void
—
When the panel opens or closes.
Tokens
Token
Value
Where it lands
--radius-xl
10px
Trigger and search corners.
--radius-lg
8px
Panel corners.
--radius-md
6px
Row corners.
--color-border-default
#E6E6E6
Borders at rest, and the panel dividers.
--color-grey-800
#7F7D83
Trigger border on hover, and chevrons.
--color-grey-200
#F1F1F1
Trigger fill on hover.
--color-grey-100
#F5F5F5
Row fill on hover.
--color-primary-active
#1877F2
Open border and keyboard focus ring.
--color-primary-light
#EBFAFF
Select all, once everything is selected.
--global-blue-1100
#0C296A
Select all text on that fill, 12.75:1 (blue-1000 would be 3.96:1).
--color-grey-1100
#1D1C20
Row and value text.
(no token)
#4F4D55
Placeholder and no-match text.
--shadow-dropdown
0 4px 12px rgba(0,0,0,.08), …
Panel elevation.
Search select
A select you can type into, for lists too long to scan by eye.
Refined portVue source: WildSearchSelect.vue
Try it
Open it and type “ohau” or a client’s name. The list holds 120 sites.
Site
Search by site or client.
Selection
Size
Error
Disabled
<WildSearchSelect
v-model="siteId"
label="Site"
placeholder="Select site"
search-placeholder="Search sites or clients"
help="Search by site or client."
:options="sites"
/>
When to use
Use it for lists too long to scan, such as sites or clients.
Use multiple when more than one choice is allowed.
Add meta to each option when names repeat across clients.