npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@zendeskgarden/react-dropdowns.next

v8.76.2

Published

Components related to dropdowns in the Garden Design System

Downloads

11,373

Readme

@zendeskgarden/react-dropdowns.next npm version

This package includes components related to dropdowns in the Garden Design System.

Installation

npm install @zendeskgarden/react-dropdowns.next

# Peer Dependencies - Also Required
npm install react react-dom styled-components @zendeskgarden/react-theming

Usage

Combobox

import { ThemeProvider } from '@zendeskgarden/react-theming';
import { Field, Label, Combobox, Option } from '@zendeskgarden/react-dropdowns.next';

/**
 * Place a `ThemeProvider` at the root of your React application
 */
<ThemeProvider>
  <Field>
    <Label>Combobox</Label>
    <Combobox>
      <Option value="One" />
      <Option value="Two" />
      <Option value="Three" />
    </Combobox>
  </Field>
</ThemeProvider>;

Beyond this basic example, Garden's Combobox offers a comprehensive set of WAI-ARIA compliant combobox features. Key capabilities include:

  • Controllable: The Combobox functions in both uncontrolled and controlled modes. Controlled mode enables aspects, such as input value, selection value(s), listbox expansion, and current option active index, to share and adapt to the surrounding UI.
  • Autocomplete-able: Denotes the Combobox with list autocomplete. Filtering implementation is left to the API consumer.
  • Selectable: The Combobox API ensures the selection of one or more listbox option values, while also supporting the W3C no autocomplete example for use cases like search.
  • Multi-selectable: This feature enables the Combobox to provide WAI-ARIA multi-select listbox functionality with option-as-tag value rendering.
  • Non-editable: The Combobox supports select-only mode, where the user cannot modify the <input>.
  • Filterable: The Combobox offers various filtering methods for listbox options. Details of the filtering implementation are left to the API consumer.
  • Markup-able: The Combobox can convert input value text to rich HTML markup on blur in single-selection mode.
  • Decorate-able: The Combobox allows adding start and end media (SVG icons). Certain features will replace end media with Garden's standard dropdown chevron treatment.
  • Group-able: The Combobox API utilizes fully accessible <OptGroup> components for grouping, similar to the corresponding HTML element.
  • Compactible: Like other form elements, the Combobox supports compact sizing.
  • Field-able: The Combobox builds on Garden’s Field API context to establish accessible relationships with corresponding Label, Hint, and Message components.
  • Validate-able: The Combobox provides validation styling and accessibility comparable to other Garden form components.
  • RTL theme-able: Functionality displays and operates correctly for left-to-right and right-to-left layouts.

Menu

import { ThemeProvider } from '@zendeskgarden/react-theming';
import { Menu, Item } from '@zendeskgarden/react-dropdowns.next';

/**
 * Place a `ThemeProvider` at the root of your React application
 */
<ThemeProvider>
  <Menu button="Choose an item">
    <Item value="item-01" label="One" />
    <Item value="item-02" label="Two" />
    <Item value="item-03" label="Three" />
  </Menu>
</ThemeProvider>;

Visit storybook for live examples.