/* * Copyright (c) 2025, Salesforce, Inc. * All rights reserved. * For full license text, see the LICENSE.txt file */ /** * The `lightning/select` module lets you create a menu of options for single or multiple selection. * @see {@link https://developer.salesforce.com/docs/component-library/bundle/lightning-select/documentation|Lightning Select Documentation} */ declare module "lightning/select" { import { LightningElement } from "lwc"; /** * A menu of options for single or multiple selection. */ export default class LightningSelect extends LightningElement { /** * The text label for the component. */ label: string; /** * The identifier for the component. */ name: string; /** * The error message that's displayed below the menu * when a user interacts with the menu but does not select an option. */ messageWhenValueMissing: string; /** * A shortcut key that activates and focuses on the menu. */ accessKey: string; /** * Reserved for internal use. Controls auto-filling of the field. */ autocomplete: string; /** * Help text detailing the purpose and function of the menu of options. */ fieldLevelHelp: string; /** * The variant changes the appearance of the dropdown menu. */ variant: string; /** * Specifies whether multiple options can be selected. */ multiple: boolean; /** * The number of rows in the list that should be visible at one time. */ size: number; /** * Specifies whether an option must be selected. */ required: boolean; /** * Specifies whether the menu is disabled and users cannot interact with it. */ disabled: boolean; /** * The value of the selected option. */ value: string | string[]; /** * An array of menu options with key-value pairs for label and value. */ options: Array<{ label: string; value: string }>; /** * Aria Described by value on parent lighting-select */ ariaDescribedBy: string; /** * A space-separated list of element IDs that provide labels for the * aria-labelled-by value on parent lighting-select. */ ariaLabelledBy: string; /** * Sets focus on the select element. */ focus(): void; /** * Removes focus on from the select element. */ blur(): void; /** * Represents the validity states that an element can be in. */ validity: object; /** * Checks if the input is valid. */ checkValidity(): boolean; /** * Sets a custom error message to be displayed when a form is submitted. */ setCustomValidity(message: string): void; /** * Displays the error messages and returns false if the input is invalid. */ reportValidity(): boolean; /** * Displays an error message on an invalid select field. */ showHelpMessageIfInvalid(): void; } }