Select lets users choose one option from an options menu. Consider using select when you have 5 or more options to choose from.
<nord-select name="page-size" value="25" label="Label"> <option value="25">25 per page</option> <option value="50">50 per page</option> <option value="100">100 per page</option> </nord-select>
Controls whether the select expands to fill the width of its container.
The size of the component.
Label for the input.
Optional hint text to be displayed with the input. Alternatively use the hint slot.
Visually hide the label, but still show it to assistive technologies like screen readers.
Placeholder text to display within the input.
Optional error to be shown with the input. Alternatively use the error slot.
Determines whether the input is required or not. An input marked as required will be announced as such to users of assistive technology. When using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.
Visually hide the required indicator, but still show required attribute to assistive technologies like screen readers.
Specifies the data type of the field, so that the browser may attempt to fill out the field automatically on behalf of the user.
Makes the component disabled. This prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies.
The name of the form component.
The value of the form component.
Gets the form, if any, associated with the form element. The setter accepts a string, which is the id of the form.
Fired as the user types into the input.
Fired whenever the input's value is changed via user interaction.
Default slot for holding <option> elements.
Use when a label requires more than plain text.
Use when a hint requires more than plain text.
Optional slot that holds error text for the input.
Used to place an icon at the start of select.
Programmatically move focus to the component.
Programmatically remove focus from the component.
Programmatically simulates a click on the component.
CSS Custom Properties provide more fine grain control over component presentation. We advise utilizing existing properties on the component before using these.
Controls the block size, or height, of the select using our spacing tokens.
This component is internally dependent on the following components:
This section includes guidelines for designers and developers about the usage of this component in different contexts.
- Use to let a user choose one option from an options menu.
- Use when you have more than 6 options to choose from.
- Use when you don’t know how many options there will be.
- Use hint text and placeholder to provide additional, non-critical instructions.
- Don't use a select if you have less than 6 options to choose from. Consider using radio components instead, if you have enough space to allow it.
Content guidelines #
Select labels act as a title for the select field. Labels should typically be short and in noun form:
When writing select labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):
Do not use colons in select labels:
If you experience any issues while using Nord Web Components, please head over to the Support page for more guidelines and ways to contact us.