Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@leafygreen-ui/icon-button

Package Overview
Dependencies
Maintainers
6
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/icon-button

LeafyGreen UI Kit Icon Buttons

latest
Source
npmnpm
Version
17.1.0
Version published
Weekly downloads
86K
-0.02%
Maintainers
6
Weekly downloads
 
Created
Source

IconButton

npm (scoped)

View on MongoDB.design

Installation

PNPM

pnpm add @leafygreen-ui/icon-button

Yarn

yarn add @leafygreen-ui/icon-button

NPM

npm install @leafygreen-ui/icon-button

Example

import EllipsisIcon from '@leafygreen-ui/icon/dist/Ellipsis';
import IconButton from '@leafygreen-ui/icon-button';

<IconButton darkMode={true} aria-label="Some Menu">
  <EllipsisIcon />
</IconButton>;

Properties

PropTypeDescriptionDefault
darkModebooleanDetermines whether or not the IconButton will appear in darkMode.false
onClickfunctionThe event handler function for the 'onclick' event. Receives the associated event object as the first argument.
disabledbooleanDisables the <IconButton />false
hrefstringIf a href is supplied, the component renders inside of an a tag instead of inside of a button tag.
classNamestringAdds a className to the class attribute on the container element.
childrennodeContent rendered inside of the <IconButton /> component
size'default', 'large', 'xlarge'Determines the size of the IconButton'default'
activebooleanDetermines whether the <IconButton /> will appear activefalse
aria-label or aria-labelledbystringOne of these must be provided. See note below
...native anchor or button attributesAny other properties will be spread on the rendered HTML element or component.

Special Case: Aria Labels

Either aria-label or aria-labelledby must be provided a string, or there will be a console error. This is to ensure that screenreaders have a description for what the button does, since the button itself doesn't contain any text.

Any other properties will be spread on the container element.

FAQs

Package last updated on 07 Oct 2025

Did you know?

Socket

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.

Install

Related posts