@asnewyla/icon-button
v0.1.2
Published
Icon-only button component
Maintainers
Readme
@asnewyla/icon-button
Icon-only button, composed from @asnewyla/button. Requires a label for
accessibility — there's no visible text, so aria-label carries the
accessible name and the icon itself is hidden from assistive tech.
Install
npm install @asnewyla/icon-buttonRequires @asnewyla/button's stylesheet:
import '@asnewyla/button/styles.css';Usage
import { IconButton } from '@asnewyla/icon-button';
<IconButton icon={<SaveIcon />} label="Save file" />
<IconButton icon={<TrashIcon />} label="Delete" variant="destructive" />Accepts every @asnewyla/button prop except children, startIcon, endIcon, and
as — plus the required icon and label.
License
MIT
