Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@leafygreen-ui/icon-button

Package Overview
Dependencies
Maintainers
3
Versions
97
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

  • 3.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

IconButton

npm (scoped)

Installation

Yarn

yarn add @leafygreen-ui/icon-button

NPM

npm install @leafygreen-ui/icon-button

Example

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

<IconButton variant="light" ariaLabel="Ellipsis">
  <Icon glyph="Ellipsis" />
</IconButton>;

Output HTML

<button aria-disabled="false" class="leafygreen-ui-194rp0y" aria-label="Ellipsis>
  <span class="leafygreen-ui-1rvdyoi">
    <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1">
      <title>Ellipsis</title>
      <g
        id="Ellipsis-Copy"
        stroke="none"
        stroke-width="1"
        fill="none"
        fill-rule="evenodd"
      >
        <path fill="#89989B"></path>
      </g>
    </svg>
  </span>
</button>

Properties

PropTypeDescriptionDefault
variant'dark' or 'light'Sets the style variant of the button.'light'
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
ariaLabelRequired stringValue passed to aria-label attribute to ensure component's accessibility

Any other properties will be spread on the container element.

FAQs

Package last updated on 28 Jan 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc