Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@zendeskgarden/react-dropdowns.legacy
Advanced tools
Components relating to dropdowns in the Garden Design System
This package includes components relating to legacy dropdowns in the Garden Design System.
⚠️ DEPRECATED |
---|
Use @zendeskgarden/react-dropdowns@^9.0.0 to continue using the latest Garden Dropdowns. |
npm install @zendeskgarden/react-dropdowns.legacy
# Peer Dependencies - Also Required
npm install react react-dom styled-components @zendeskgarden/react-theming
import { ThemeProvider } from '@zendeskgarden/react-theming';
import { Dropdown, Menu, Item, Trigger } from '@zendeskgarden/react-dropdowns.legacy';
/**
* Place a `ThemeProvider` at the root of your React application
*/
<ThemeProvider>
<Dropdown onSelect={value => console.log(`Selected: ${value}`)}>
<Trigger>
<button>This triggers a menu</button>
</Trigger>
<Menu placement="end" hasArrow>
<Item value="option-1">Option 1</Item>
<Item value="option-2">Option 2</Item>
<Item value="option-3">Option 3</Item>
</Menu>
</Dropdown>
</ThemeProvider>;
For all components within the react-dropdowns.legacy
package, the menu layouts and
implementations are interchangeable.
Whether you're making a Select
, Autocomplete
, or a traditional Menu
the <Menu>
implementation
will adapted to its consumer.
The react-dropdowns.legacy
package abstracts the common concepts of Menus
, Selects
, and Autocompletes
into a common API. This includes consistent visuals, common keyboard interaction, and a fully accessible
experience for sighted and non-sighted users.
The customizations available within this can be broken into two groups: placement / positioning and dropdown state
Internally, the <Dropdown>
component uses PopperJS
for its positioning calculations.
The <Menu>
component accepts all customizations regarding placement, boundaries, overflows,
etc. via the popperModifiers
prop.
/** Customize default overflow settings to position against the `viewport` */
<Menu popperModifiers={{ preventOverflow: { boundariesElement: 'viewport' } }}>
<Item value="item-1">Item 1</Item>
<Item value="item-2">Item 2</Item>
<Item value="item-3">Item 3</Item>
</Menu>
We use the Downshift render-prop library to handle our keyboard and accessibility logic.
The following states can be controlled directly from the <Dropdown>
component:
Autocomplete
All other customizations may be provided directly to the Downshift provider
via the downshiftProps
prop.
Downshift provides several advanced customization features that can be very helpful when customizing this component. The stateReducer pattern is a common customization strategy.
If you are using server side rendering you may need to configure specific Downshift settings.
This package re-exports the Downshift resetIdCounter
utility. It allows resetting the internal id
counter which is used to generate unique ids for Downshift.
v9.0.0-next.6 (2024-03-29)
chrome
accordions
, buttons
, dropdowns.legacy
, dropdowns
, forms
, loaders
, modals
, notifications
, tables
, tags
, theming
, typography
colorpickers
, theming
accordions
, breadcrumbs
, chrome
, forms
, typography
theming
.template
, accordions
, avatars
, buttons
, chrome
, colorpickers
, datepickers
, drag-drop
, dropdowns.legacy
, dropdowns
, forms
, grid
, loaders
, modals
, notifications
, tables
, tags
, theming
, tooltips
, typography
FAQs
Components relating to dropdowns in the Garden Design System
The npm package @zendeskgarden/react-dropdowns.legacy receives a total of 49,149 weekly downloads. As such, @zendeskgarden/react-dropdowns.legacy popularity was classified as popular.
We found that @zendeskgarden/react-dropdowns.legacy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.