- Combobox
- Examples
- Help text
- Clearable
- Disabled
- Multiple selection
- Setting initial values
- Grouping options
- Placement
- Prefix & suffix
- Async/lazy loading
- Filtering an in-memory list
- Truncated results
- Non-searchable mode
- Combobox vs Select
- Accessibility
- Keyboard shortcuts
- Text assistance and mobile keyboards
- Best practices
- Importing
- Slots
- Properties
- Events
- Methods
- CSS Parts
- Dependencies
Combobox
<ahi-combobox> | AhiCombobox
Combobox lets users filter and select from a list of options by typing. It combines a text input with a dropdown menu.
Comboboxes combine a text input with a dropdown menu, allowing users to search and filter through options. Unlike selects, comboboxes are searchable by default, making them ideal for larger lists where users need to quickly find specific items.
<ahi-combobox label="Select a country" placeholder="Type to search...">
<ahi-combobox-option value="us">United States</ahi-combobox-option>
<ahi-combobox-option value="ca">Canada</ahi-combobox-option>
<ahi-combobox-option value="mx">Mexico</ahi-combobox-option>
<ahi-combobox-option value="uk">United Kingdom</ahi-combobox-option>
<ahi-combobox-option value="de">Germany</ahi-combobox-option>
<ahi-combobox-option value="fr">France</ahi-combobox-option>
</ahi-combobox>
This component works with standard <form> elements. Please refer to the section on
form controls to learn
more about form submission and client-side validation.
Examples
Help text
Add descriptive help text to a combobox with the help-text attribute. For help texts that
contain HTML, use the help-text slot instead.
<ahi-combobox
label="Select your state"
placeholder="Type to search..."
help-text="Start typing to filter the list of states"
>
<ahi-combobox-option value="al">Alabama</ahi-combobox-option>
<ahi-combobox-option value="ak">Alaska</ahi-combobox-option>
<ahi-combobox-option value="az">Arizona</ahi-combobox-option>
<ahi-combobox-option value="ar">Arkansas</ahi-combobox-option>
<ahi-combobox-option value="ca">California</ahi-combobox-option>
</ahi-combobox>
Clearable
Use the clearable attribute to add a clear button that lets users quickly remove the selected
value.
<ahi-combobox label="Select one" placeholder="Type to search..." clearable>
<ahi-combobox-option value="option-1">Option 1</ahi-combobox-option>
<ahi-combobox-option value="option-2">Option 2</ahi-combobox-option>
<ahi-combobox-option value="option-3">Option 3</ahi-combobox-option>
</ahi-combobox>
Disabled
Use the disabled attribute to disable a combobox.
<ahi-combobox label="Select one" placeholder="Type to search..." disabled value="option-1">
<ahi-combobox-option value="option-1">Option 1</ahi-combobox-option>
<ahi-combobox-option value="option-2">Option 2</ahi-combobox-option>
<ahi-combobox-option value="option-3">Option 3</ahi-combobox-option>
</ahi-combobox>
Multiple selection
To allow multiple options to be selected, use the multiple attribute. Selected options are
displayed as tags inside the input.
<ahi-combobox label="Select multiple" placeholder="Type to search..." multiple clearable>
<ahi-combobox-option value="option-1">Option 1</ahi-combobox-option>
<ahi-combobox-option value="option-2">Option 2</ahi-combobox-option>
<ahi-combobox-option value="option-3">Option 3</ahi-combobox-option>
<ahi-combobox-option value="option-4">Option 4</ahi-combobox-option>
<ahi-combobox-option value="option-5">Option 5</ahi-combobox-option>
</ahi-combobox>
Note that multi-select options may wrap, causing the control to expand vertically. You can use the
max-options-visible attribute to control the maximum number of selected options to show at
once.
Setting initial values
Use the value attribute to set the initial selection.
When using multiple, the value property is an array of the selected
options’ values, and option values may contain any characters — including spaces. Only the
value attribute is space-delimited (HTML attributes can’t express arrays), so options
whose values contain spaces can’t be preselected from markup; assign an array to the
value property instead.
<ahi-combobox label="Select one" value="option-1 option-2" multiple clearable>
<ahi-combobox-option value="option-1">Option 1</ahi-combobox-option>
<ahi-combobox-option value="option-2">Option 2</ahi-combobox-option>
<ahi-combobox-option value="option-3">Option 3</ahi-combobox-option>
<ahi-combobox-option value="option-4">Option 4</ahi-combobox-option>
</ahi-combobox>
Grouping options
Use <ahi-divider> and <ahi-menu-label> to group options visually.
<ahi-combobox label="Select a fruit" placeholder="Type to search...">
<ahi-menu-label>Citrus</ahi-menu-label>
<ahi-combobox-option value="orange">Orange</ahi-combobox-option>
<ahi-combobox-option value="lemon">Lemon</ahi-combobox-option>
<ahi-combobox-option value="lime">Lime</ahi-combobox-option>
<ahi-divider></ahi-divider>
<ahi-menu-label>Berries</ahi-menu-label>
<ahi-combobox-option value="strawberry">Strawberry</ahi-combobox-option>
<ahi-combobox-option value="blueberry">Blueberry</ahi-combobox-option>
<ahi-combobox-option value="raspberry">Raspberry</ahi-combobox-option>
</ahi-combobox>
Placement
The preferred placement of the combobox’s dropdown can be set with the placement attribute.
Note that the actual position may vary to ensure the panel remains in the viewport. Valid placements are
top and bottom.
<ahi-combobox label="Select one" placeholder="Type to search..." placement="top">
<ahi-combobox-option value="option-1">Option 1</ahi-combobox-option>
<ahi-combobox-option value="option-2">Option 2</ahi-combobox-option>
<ahi-combobox-option value="option-3">Option 3</ahi-combobox-option>
</ahi-combobox>
Prefix & suffix
Use the prefix and suffix slots to add presentational icons and text. Avoid
slotting in interactive elements, such as buttons, links, etc.
<ahi-combobox label="Select one" placeholder="Type to search..." clearable>
<ahi-icon name="search" slot="prefix"></ahi-icon>
<ahi-badge slot="suffix">New</ahi-badge>
<ahi-combobox-option value="option-1">Option 1</ahi-combobox-option>
<ahi-combobox-option value="option-2">Option 2</ahi-combobox-option>
<ahi-combobox-option value="option-3">Option 3</ahi-combobox-option>
</ahi-combobox>
Async/lazy loading
The combobox supports supplying options dynamically based on user input. Use the lazy attribute
and listen for the ahi-search-change event. When lazy is enabled the combobox’s
own client-side filtering is switched off and the consumer is responsible for filtering —
from a server call, or from a list it already holds in memory. Both are supported; the in-memory case is
covered below.
Reach for lazy whenever the full list is large, whether or not you have a search endpoint.
Non-lazy filtering works by setting hidden on option elements, so every option has to be in the
DOM for it to work — lazy is the only way to keep the DOM small.
<ahi-combobox id="async-demo" label="Search users" placeholder="Type to search..." lazy>
</ahi-combobox>
<script type="module">
const combobox = document.getElementById('async-demo');
let searchController = null;
// Simulated API call with server-side filtering
async function searchUsers(query, signal) {
// Simulate network delay
await new Promise((resolve, reject) => {
const timeout = setTimeout(resolve, 800);
signal?.addEventListener('abort', () => {
clearTimeout(timeout);
reject(new DOMException('Aborted', 'AbortError'));
});
});
const allUsers = [
{ id: '1', name: 'Alice Johnson' },
{ id: '2', name: 'Bob Smith' },
{ id: '3', name: 'Charlie Brown' },
{ id: '4', name: 'Diana Prince' },
{ id: '5', name: 'Eve Anderson' }
];
// Server performs the filtering
if (!query) return allUsers;
return allUsers.filter(user =>
user.name.toLowerCase().includes(query.toLowerCase())
);
}
combobox.addEventListener('ahi-search-change', async (e) => {
const query = e.detail.query;
// Cancel any pending search
if (searchController) {
searchController.abort();
}
searchController = new AbortController();
// Show loading spinner (replaces expand icon)
combobox.loading = true;
// Clear existing options immediately
combobox.innerHTML = '';
try {
// Fetch filtered results from server
const users = await searchUsers(query, searchController.signal);
// Add new options
users.forEach(user => {
const option = document.createElement('ahi-combobox-option');
option.value = user.id;
option.textContent = user.name;
combobox.appendChild(option);
});
// Hide loading spinner
combobox.loading = false;
} catch (err) {
// Ignore abort errors (new search started)
if (err.name !== 'AbortError') {
combobox.loading = false;
throw err;
}
}
});
</script>
Filtering an in-memory list
There is no requirement that lazy talk to a server. When the full list is already on the client
— and is too large to put in the DOM all at once — filter it in memory and render a capped slice. This is
the same pattern as above without the network, so there is no spinner and no request to cancel.
Note the total-results attribute: it tells the combobox the true size of the match set so it
can say what it is not showing. Without it a capped list looks complete. See
Truncated results.
<ahi-combobox id="in-memory-demo" label="Rendering provider" placeholder="Search providers" lazy load-more>
</ahi-combobox>
<script type="module">
const combobox = document.getElementById('in-memory-demo');
const PAGE_SIZE = 10;
// The whole list, already on the client. Stand-in for a few thousand practitioners.
const providers = Array.from({ length: 240 }, (_, i) => ({
id: String(i + 1),
name: `Provider ${String(i + 1).padStart(3, '0')}, MD`
}));
let rendered = PAGE_SIZE;
function matches(query) {
if (!query) return providers;
const term = query.toLowerCase();
return providers.filter(p => p.name.toLowerCase().includes(term));
}
function render(query) {
const found = matches(query);
// Tell the combobox the real total, then render only the slice.
combobox.totalResults = found.length;
combobox.innerHTML = '';
found.slice(0, rendered).forEach(provider => {
const option = document.createElement('ahi-combobox-option');
option.value = provider.id;
option.textContent = provider.name;
combobox.appendChild(option);
});
}
combobox.addEventListener('ahi-search-change', event => {
// A new query starts a new slice
rendered = PAGE_SIZE;
render(event.detail.query);
});
combobox.addEventListener('ahi-load-more', event => {
rendered = event.detail.rendered + PAGE_SIZE;
render(combobox.searchQuery);
});
render('');
</script>
Truncated results
In lazy mode the combobox only ever sees the slice you rendered, so it cannot know how many
options actually matched. Set total-results and it will state what it is showing at the foot of
the listbox — Showing 10 of 240 — resolving to Showing all 7 matches once the
slice is the whole set.
That covers the first half of the problem: the list no longer presents a capped slice as if it were
complete. For the second half — letting someone browse to an option without already knowing its name — add
load-more and handle ahi-load-more:
-
load-morerenders a Show more control in the footer. It joins the arrow-key cycle after the last option, so a keyboard user reaches it by continuing to press Down. Activating it moves focus to the first newly-added option. -
load-more-countsets the slice size used in the label, so it readsShow 10 morerather thanShow more. -
ahi-load-morefires with{ rendered, total }. The consumer appends and re-renders; the combobox never fetches anything itself.
Prefer load-more to a scroll-driven reveal. ahi-listbox-scroll-end exists for
consumers who want the latter, but there is deliberately no built-in scroll UI: it is the most fluid option
with a mouse and the worst by any other means — nothing to tab to and nothing for a screen reader to act on.
If the footer’s own wording does not suit, fill the listbox-footer slot and render your own.
Doing so replaces the generated footer entirely, so include the count yourself — and remember an
aria-live region if the count changes, or the update is silent to a screen reader.
<ahi-combobox label="Rendering provider" placeholder="Search providers" lazy total-results="2736" load-more load-more-count="50" open>
<ahi-combobox-option value="1">Abbott, Marcus R., MD</ahi-combobox-option>
<ahi-combobox-option value="2">Acevedo, Lina P., NP</ahi-combobox-option>
<ahi-combobox-option value="3">Allen, Thomas W., DO</ahi-combobox-option>
<ahi-combobox-option value="4">Adams, Priya N., MD</ahi-combobox-option>
</ahi-combobox>
Non-searchable mode
Set searchable to false to make the combobox behave like a regular select
(readonly input). This is useful when you want the combobox appearance but don’t need search functionality.
<ahi-combobox label="Select one" placeholder="Select an option" searchable="false">
<ahi-combobox-option value="option-1">Option 1</ahi-combobox-option>
<ahi-combobox-option value="option-2">Option 2</ahi-combobox-option>
<ahi-combobox-option value="option-3">Option 3</ahi-combobox-option>
</ahi-combobox>
Combobox vs Select
While both components allow users to choose from a list of options, there are key differences:
Use <ahi-combobox> when:
- You have a large list of options (10+ items)
- Users need to search/filter options
- You need async/lazy loading of options
- You want a more modern, searchable interface
Use <ahi-select> when:
- You have a small list of options (< 10 items)
- Options don’t need to be searchable
- You want the native select behavior
- You prefer a simpler, more traditional dropdown
Accessibility
The combobox follows the ARIA Combobox Pattern and includes:
- Proper ARIA roles (
combobox,listbox,option) - Keyboard navigation (Arrow keys, Home, End, Enter, Escape)
- Screen reader announcements for selection changes
- Focus management
- Live region updates for search results
Keyboard shortcuts
- Enter - Opens the dropdown or selects the current option
- Escape - Closes the dropdown
- Arrow Up/Down - Navigate through options
- Home/End - Jump to first/last option
- Type - Search/filter options (when searchable)
- Tab - Moves focus to the next focusable element
Text assistance and mobile keyboards
The search field accepts the same assistance and keyboard attributes as <ahi-input>:
autocapitalize, autocomplete, autocorrect, spellcheck,
inputmode and enterkeyhint.
The first four default to off, which is what a typeahead wants — the field matches the literal string you type against its options, so a keyboard that rewrites or capitalizes your input makes it search for something you did not ask for. Turn any of them back on if your field is prose rather than an identifier.
<ahi-combobox label="Client" autocorrect="on" autocapitalize="sentences"></ahi-combobox>
Use inputmode to raise the right keyboard, and enterkeyhint to label its Enter
key:
<ahi-combobox label="Account number" inputmode="numeric" enterkeyhint="search"></ahi-combobox>
Bind autocorrect as a string, not a boolean. autocorrect is a
boolean IDL attribute whose content attribute is the string "on" or
"off". A framework that forces attributes through setAttribute — Vue does —
stringifies a bound false to "false", and the HTML spec says any value that is
not "off" means on. So :autocorrect="false" would switch
autocorrect on, the exact opposite of the intent.
AKU deliberately departs from the spec here: "false" and "0" are read as off,
alongside "off". So the mistake is harmless in AKU. It is still clearer to write
autocorrect="off", and other custom elements will not be so forgiving.
Best practices
- Use clear, descriptive labels - Always provide a label that clearly describes what the user is selecting
-
Add help text for complex options - If the selection requires context, use the
help-textattribute -
Enable clearable for optional fields - Use
clearableattribute to allow users to deselect -
Consider list size - For very large lists (100+ items), use
lazywith theahi-search-changeevent, and settotal-resultsso a capped list does not look complete - Test keyboard navigation - Ensure all interactions work with keyboard only
- Provide meaningful placeholders - Use placeholders like “Type to search…” to indicate searchability
Importing
To import this component using a script tag:
<script type="module" src="/path/to/azalea-kit-ui/dist/components/combobox/combobox.js"></script>
To import this component using a bundler:
import '@azaleahealth/azalea-kit-ui/dist/components/combobox/combobox.js';
Slots
| Name | Description |
|---|---|
| (default) | The listbox options. Must be <ahi-combobox-option> elements. |
label
|
The combobox’s label. Alternatively, you can use the label attribute. |
prefix
|
Used to prepend an icon or similar element to the combobox. |
clear-icon
|
An icon to use in lieu of the default clear icon. |
expand-icon
|
An icon to use in lieu of the default expand icon. |
help-text
|
Text that describes how to use the combobox. Alternatively, you can use the
help-text attribute.
|
listbox-footer
|
Replaces the generated truncation footer at the foot of the listbox. Filling it takes over the count
line and the Show more control entirely, so render your own count – and an
uaria-liveregion if it changes, or the update is silent to a screen reader.
|
error
|
An error message shown once the control is invalid. Plain text can be set with the
error property instead; use this slot when the message needs markup.
|
Learn more about using slots.
Properties
| Name | Description | Type | Default | |
|---|---|---|---|---|
autocapitalize
|
Controls whether and how text entered into the search field is automatically capitalized. |
'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters'
|
'off'
|
|
autocomplete
|
Specifies what permission the browser has to autofill the search field. Defaults to
off, which is what a typeahead wants: the field matches against the option list, not a
saved value.
|
string
|
'off'
|
|
autocorrect
|
Indicates whether the browser’s autocorrect feature is on or off. As an attribute, use
"on" or "off"; as a property it is a boolean, matching the platform’s
autocorrect IDL attribute. Defaults to off. A typeahead matches the literal string
against its options, so a keyboard that rewrites what was typed makes the field search for something
the user did not ask for – which is how the identifier uqbdbecame uAndon
blur (CORE-631).
|
boolean
|
false
|
|
enterkeyhint
|
Used to customize the label or icon of the Enter key on virtual keyboards. |
'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'
|
- | |
inputmode
|
Tells the browser what type of data will be entered into the search field, so it can raise the appropriate virtual keyboard on supportive devices. |
'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'
|
- | |
spellcheck
|
Enables spell checking on the search field. Off by default, for the same reason autocorrect is. |
boolean
|
false
|
|
defaultValue
value
|
The default value of the form control, set via the value attribute. Primarily used for
resetting the form control. When multiple is enabled the attribute form is a
space-delimited list, so attribute-authored values must not contain spaces (assign an array to the
value property for values that do).
|
string | string[]
|
''
|
|
placeholder
|
Placeholder text to show as a hint when the combobox is empty. |
string
|
''
|
|
multiple
|
Allows more than one option to be selected. |
boolean
|
false
|
|
maxOptionsVisible
max-options-visible
|
The maximum number of selected options to show when multiple is true. After the
maximum, ”+n” will be shown to indicate the number of additional items that are selected. Set to 0
to remove the limit.
|
number
|
3
|
|
disabled
|
Disables the combobox control. |
boolean
|
false
|
|
clearable
|
Adds a clear button when the combobox is not empty. |
boolean
|
false
|
|
searchable
|
Enables search/filter functionality. When false, the input is readonly like ahi-select. |
boolean
|
true
|
|
lazy
|
Enable lazy/async mode. Emits ahi-search-change so options can be supplied dynamically.
When enabled the combobox’s own client-side filtering is disabled and the consumer is responsible
for filtering — from a server call, or from a list it already holds in memory. The in-memory case is
not a workaround; it is the only way to keep the DOM small. Non-lazy filtering works by setting
hidden on option elements, so it still requires every option to be present. A consumer
with thousands of options needs lazy whether or not it has a search endpoint.
|
boolean
|
false
|
|
loading
|
Shows a loading spinner in the dropdown. |
boolean
|
false
|
|
createOption
create-option
|
Allows creating new options by typing values not in the list. |
boolean
|
false
|
|
open
|
Indicates whether or not the combobox is open. You can toggle this attribute to show and hide the
menu, or you can use the show() and hide() methods and this attribute will
reflect the combobox’s open state.
|
boolean
|
false
|
|
hoist
|
Deprecated. Enabled a fixed positioning strategy to keep the listbox from being
clipped by a container with overflow: auto|scroll. The listbox now renders in the
browser’s native top layer, which escapes clipping containers on its own, so this has no effect
except as a fallback on browsers without Popover API support. Remove it from your markup; no
replacement is needed.
|
boolean
|
false
|
|
label
|
The combobox’s label. If you need to display HTML, use the label slot instead. |
string
|
''
|
|
placement
|
The preferred placement of the combobox’s menu. Note that the actual placement may vary as needed to keep the listbox inside of the viewport. |
'top' | 'bottom'
|
'bottom'
|
|
helpText
help-text
|
The combobox’s help text. If you need to display HTML, use the help-text slot instead.
|
string
|
''
|
|
error
|
An error message to show on the control. Setting it makes the control genuinely invalid: it enters
the user-invalid state, matches :invalid, and blocks native form
submission — which is what a consumer binding a server-side rejection expects. Clearing it clears
that validity. Use the error slot instead when the message needs markup rather than
plain text.
|
string
|
''
|
|
required
|
The combobox’s required attribute. |
boolean
|
false
|
|
noOptionsText
no-options-text
|
Text to display when there are no options available. |
string
|
'No options available'
|
|
noResultsText
no-results-text
|
Text to display when search has no results. |
string
|
'No results found'
|
|
totalResults
total-results
|
The true number of results the consumer has, which may be larger than the number of options it
rendered. Only the consumer knows this – in ulazymode the combobox only ever sees the
slice. Set it and the listbox states what it is showing at its foot (“Showing 50 of 2,736”),
resolving to “Showing all 7 matches” once the slice is the whole set. Leave it unset and nothing
changes: the footer never appears.
|
number | undefined
|
- | |
loadMore
load-more
|
Renders a “Show more” control in the listbox footer, which emits ahi-load-more so the
consumer can extend the slice. Requires total-results – there is nothing to extend
towards without it.
|
boolean
|
false
|
|
loadMoreCount
load-more-count
|
Size of the next slice, used only to write the control’s label (“Show 50 more”). Omit it and the label reads “Show more”. It does not itself decide how many options the consumer adds. |
number | undefined
|
- | |
validity
|
Gets the validity state object | - | - | |
validationMessage
|
Gets the validation message | - | - | |
value
|
The current value of the control, submitted as a name/value pair with form data. When
multiple is enabled, the value is an array of the selected options’ values and option
values may contain any characters, including spaces — only the space-delimited
value attribute restricts them (see defaultValue). In single mode,
assigning an array keeps its first entry.
|
- | - | |
formId
form
|
By default, form controls are associated with the nearest containing
<form> element. This attribute allows you to place the form control outside of a
form and associate it with the form that has this id. The form must be in the same
document or shadow root for this to work.
|
string
|
''
|
|
form
|
The form the control is associated with, following the native form-control contract: reading returns
the associated <form> element (or null if there is none), assigning
takes a form id — assign an empty string to restore association with the nearest containing form.
|
HTMLFormElement | null
|
- | |
updateComplete |
A read-only promise that resolves when the component has finished updating. |
Learn more about properties and attributes.
Events
| Name | Description | Event Detail |
|---|---|---|
ahi-change |
Emitted when the control’s value changes. | - |
ahi-clear |
Emitted when the control’s value is cleared. | - |
ahi-input |
Emitted when the user types in the search field. | - |
ahi-search-change |
Emitted when the search query changes. Use this for async/lazy loading. | - |
ahi-load-more |
Emitted when the listbox footer’s Show more control is activated.
detail carries { rendered, total }. The consumer appends to the option
list; the combobox never fetches.
|
- |
ahi-listbox-scroll-end |
Emitted once per arrival within 48px of the end of a truncated listbox, for consumers building a scroll-driven reveal. There is no built-in scroll UI. | - |
ahi-focus |
Emitted when the control gains focus. | - |
ahi-blur |
Emitted when the control loses focus. | - |
ahi-show |
Emitted when the combobox’s menu opens. | - |
ahi-after-show |
Emitted after the combobox’s menu opens and all animations are complete. | - |
ahi-hide |
Emitted when the combobox’s menu closes. | - |
ahi-after-hide |
Emitted after the combobox’s menu closes and all animations are complete. | - |
ahi-invalid |
Emitted when the form control has been checked for validity and its constraints aren’t satisfied. | - |
Learn more about events.
Methods
| Name | Description | Arguments |
|---|---|---|
show() |
Shows the listbox. | - |
hide() |
Hides the listbox. | - |
checkValidity() |
Checks for validity but does not show a validation message. Returns true when valid and
false when invalid.
|
- |
reportValidity() |
Checks for validity and shows the browser’s validation message if the control is invalid. | - |
setCustomValidity() |
Sets a custom validation message. Pass an empty string to restore validity. |
message: string
|
focus() |
Sets focus on the control. |
options: FocusOptions
|
blur() |
Removes focus from the control. | - |
resetValidity() |
Hides validity again, returning the control to its pristine state: it stops matching
:user-invalid and drops its error styling until the user next interacts with it. The
value and the validity are both untouched — an empty required control is still invalid and still
blocks submission. This only changes whether that invalidity is shown. Interaction state
otherwise has exactly one automatic exit, form.reset(). Call this when the application
replaces a value itself and the old error no longer describes anything the user did: loading a
draft, switching which record is being edited, or clearing a filter row.
|
- |
Learn more about methods.
CSS Parts
| Name | Description |
|---|---|
form-control |
The form control that wraps the label, input, and help text. |
form-control-label |
The label’s wrapper. |
form-control-input |
The combobox’s wrapper. |
form-control-help-text |
The help text’s wrapper. |
form-control-error |
The error’s wrapper. |
combobox |
The container that wraps the prefix, search input, tags, clear icon, and expand button. |
prefix |
The container that wraps the prefix slot. |
suffix |
The container that wraps the suffix slot. |
search-input |
The search input element. |
listbox |
The listbox container where options are slotted. |
empty |
The message shown when no options are visible. |
panel |
The popup’s surface, wrapping the listbox and the truncation footer. Owns the background, rounded corners, shadow and the popup’s height budget. |
listbox-footer |
The truncation footer beneath the listbox. |
listbox-footer-text |
The count line inside the footer. |
load-more-button |
The footer’s Show more control. |
tags |
The container that houses option tags when multiple is used. |
tag |
The individual tags that represent each multiselect option. |
tag__base |
The tag’s base part. |
tag__content |
The tag’s content part. |
tag__remove-button |
The tag’s remove button. |
tag__remove-button__base |
The tag’s remove button base part. |
clear-button |
The clear button. |
expand-icon |
The container that wraps the expand icon. |
spinner |
The loading spinner. This control inherits setCustomValidity(message),
checkValidity() and reportValidity() from the form-control base class.
Because they are inherited rather than declared here, they do not appear in this component’s
generated type definitions – which is why they are easy to conclude do not exist. They do, and they
work.
|
Learn more about customizing CSS parts.
Dependencies
This component automatically imports the following dependencies.
<ahi-icon><ahi-icon-button><ahi-popup><ahi-spinner><ahi-tag>