Combobox

Combobox

A fully functional combobox for multi-selecting items.

Technical Details

  • Right now, this is the best version of a combobox we can come up with. It's not perfect, but it's pretty good and accessible.
  • You can fully operate it with the keyboard.

Dependencies

  • Alpine.js - Some or all of the components require Alpine.js for functionality.
  • Alpine.js Focus Plugin - You should also consider adding the focus plugin for better focus management.

Colors

$colors: (
  'combobox': (
    'item-background': hsl(262deg 71% 98%),
    'item-foreground': hsl(262deg 71% 49%),
  ),
);
// Dark mode addition to color the chevron icon.
[data-theme-mode='dark'] {
  color-scheme: dark;

  .combobox__control {
    @include field-icon(
      config('select', $form-icon, false),
      color('select-foreground', 'form', true, $dark-colors),
    );
  }
}

Documentation

Learn about Spruce CSS through our extensive documentation.

Components

Explore our extensive UI library built with Spruce CSS.

Blog

Read about front-end development and concepts of Spruce CSS.

Find us on GitHub

Did you find a bug? Have an idea or a question? Please open an issue to help us develop the project.