|
Download wp-calypso/client/components/button-group/README.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.26 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/button-group/README.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/button-group/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/button-group/README.md
1.26 kB
Button Group
Button group displays multiple related actions in a row to help with the display of those actions. Use to emphasize several buttons as a thematically-related set among other controls.
Usage
import { Button } from '@automattic/components';
import ButtonGroup from 'calypso/components/button-group';
function render() {
return (
<ButtonGroup>
<Button compact>Approve</Button>
<Button compact>Trash</Button>
<Button compact>Spam</Button>
</ButtonGroup>
);
}
General guidelines
- Follow the same guidelines as the Button component.
- To manipulate or switch visible content, use the SegmentedControl component instead.
- Group together actions that have a relationship.
- Be thoughtful about how multiple horizontally placed buttons will look and work on small screens.
Related components
- See the Button component for more detail.
- Use the SegmentedControl component to switch content.
- To use a button with a secondary popover menu, use the SplitButton component.
- To display a loading spinner with a button, use the SpinnerButton component.