Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@zendeskgarden/react-buttons
Advanced tools
Collection of components and render prop containers relating to buttons in the Garden Design System
@zendeskgarden/react-buttons is a package that provides a set of accessible and customizable button components for React applications. It is part of the Zendesk Garden design system, which aims to offer a consistent and cohesive set of UI components.
Basic Button
This is a basic button component that can be used to trigger actions in a React application. It is styled according to the Zendesk Garden design system.
<Button>Click me</Button>
Button Sizes
The package provides buttons in different sizes, allowing developers to choose the appropriate size for their UI needs.
<Button size="small">Small Button</Button>
<Button size="large">Large Button</Button>
Button Variants
Different button variants are available, such as primary and danger, to convey different actions or states to the user.
<Button isPrimary>Primary Button</Button>
<Button isDanger>Danger Button</Button>
Icon Buttons
Icon buttons are available for actions that can be represented with an icon, providing a more compact and visually appealing option.
<IconButton aria-label="Settings"><SettingsIcon /></IconButton>
React-Bootstrap is a popular library that provides Bootstrap components as React components. It offers a wide range of button styles and sizes similar to @zendeskgarden/react-buttons, but with the Bootstrap design system.
Material-UI (now MUI) is a comprehensive library of React components that implement Google's Material Design. It offers a variety of button components with extensive customization options, similar to @zendeskgarden/react-buttons, but follows the Material Design guidelines.
Chakra UI is a modern React component library that provides a set of accessible and composable components, including buttons. It offers similar functionality to @zendeskgarden/react-buttons with a focus on simplicity and ease of use.
This package includes components and render prop containers relating to buttons within the Garden Design System.
npm install @zendeskgarden/react-buttons
# Peer Dependencies - Also Required
npm install react react-dom prop-types styled-components @zendeskgarden/react-theming
/**
* Include button styling at the root of your application
*/
import '@zendeskgarden/react-buttons/dist/styles.css';
import { ThemeProvider } from '@zendeskgarden/react-theming';
import { Button } from '@zendeskgarden/react-buttons';
/**
* Place a `ThemeProvider` at the root of your React application
*/
<ThemeProvider>
<Button onClick={() => alert('clicked')}>Default</Button>
<Button primary disabled>
Disabled Primary button
</Button>
</ThemeProvider>;
initialState = {
selectedKey: 'item-1'
};
<ButtonGroup selectedKey={state.selectedKey} onStateChange={setState}>
<Button key="item-1">Item 1</Button>
<Button key="item-2">Item 2</Button>
<Button key="item-3">Item 3</Button>
</ButtonGroup>;
FAQs
Components relating to buttons in the Garden Design System
The npm package @zendeskgarden/react-buttons receives a total of 220,507 weekly downloads. As such, @zendeskgarden/react-buttons popularity was classified as popular.
We found that @zendeskgarden/react-buttons 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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.