Save 15% on all Justd Blocks
Components

Select

A customizable dropdown menu that lets users choose a single option from a predefined list, optimized for accessibility and usability.

Basic

A select component displays a dropdown list of options, allowing users to pick one from the list.

Loading...

Installation

If you hit any issues, make sure you check out the installation guide here for more information.

Composed Components

When you install this component via the CLI, it automatically loads all composed components, so you don’t need to add them individually.

The Select comes packed with several components to enhance functionality and provide a seamless experience.

A pop-up menu that reveals a list of selectable options, commonly used for navigation, filters, or form inputs.
ListBox are designed to present and manage lists of options or data entries, allowing users to view and select from multiple choices efficiently.
Field's a core piece every other component uses. It flexes reusable styles, showing up in inputs, labels, descriptions, and more.
A small, floating UI element that appears near a trigger to show contextual information or actions.

Manual Installation

Make sure you also install the composed components and the required packages for the component to function properly.

Anatomy

Select Item Details

If you need to provide more information about an item, use the SelectItemDetails component to display additional details.

Loading...

Section

A select component can display items grouped together in sections.

Loading...

Select with Icon

A select component can display items grouped together in sections.

Loading...

Validation

If a user submits the form without selecting an item, an error message will appear.

Loading...

Controlled

You can control the select component by passing the selectedKey prop.

Loading...

Uncontrolled

You can uncontrolled the select component by passing the defaultSelectedKey prop.

Loading...

Label

When the children option is a string, Select.Label will automatically wrap it. However, if the option includes an icon or avatar, you'll need to manually define the wrapper like this:

<Select.Option id="discord" textValue="Discord">
  <IconBrandDiscord />
  <Select.Label>Discord</Select.Label>
</Select.Option>

Disabled

When the select component is disabled, it cannot be interacted with.

Loading...