Skip to content

@hrc/button

Simple button components for your React app

Demo generated with code from Usage section

Installation

Terminal window
npm install @hrc/button

Usage

import { Button, ButtonIcon, ButtonGroup } from "@hrc/button";
import { Icon } from "@hrc/material-icons";
export function PackageDemo() {
return (
<>
<Button size="large" color="primary" iconEnd={<Icon name="delete" />}>
Delete
</Button>
<ButtonIcon color="error">
<Icon name="favorite" />
</ButtonIcon>
<ButtonGroup>
<Button>One</Button>
<Button>Two</Button>
<Button>Three</Button>
<ButtonIcon>
<Icon name="search" />
</ButtonIcon>
</ButtonGroup>
</>
);
}

Demos

For examples and details on the usage of the components, see the demo pages:

API

See documentation below for reference to all of the props, classes and CSS variables (custom properties) available for button components: