For detailed instructions, view our install section in this documentation. Make sure all of the dependencies and polyfills are loaded to make the component cross-browser compatible.
Important Note: This component uses our icon component. Please add this as a dependency.
Follow these steps to successfully build out the select component. Start by adding a
<pearson-select> element to your application.
Next, you can add options to your select by adding a child element of
<option> with an attribute of
value and the value being a descriptive string that represents the option.
All attributes in this API are required.
|"I am a select box"||The label you want displayed with input .|
All attributes in this API are optional.
|'false'||Changes the single select dropdown to a multi select combobox.|
|unset||The number of rows you want the multi select combobox to have|
|Determines whether the input is disabled.|
|'error warning'||Adds error styling and warning message.|
pearson-input component does not emit any events, however you can still capture native events from the select by tapping into the components shadowroot.
You can add any native attribute to the select by tapping into the components shadowroot.
Do you prefer to use HTML instead of a web component? No problem, use the markup below along with CSS.