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

@hig/icon-button

Package Overview
Dependencies
Maintainers
5
Versions
269
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hig/icon-button

HIG IconButton component

  • 0.1.0-alpha.1427107d
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
102
decreased by-81.08%
Maintainers
5
Weekly downloads
 
Created
Source

IconButton

Action buttons that include an icon only, with no background. Useful for compact displays or toolbars with a number of related controls.

Read more about where and how to use IconButton on the website.

Getting started

yarn add @hig/icon-button

Import the component and CSS

import IconButton from '@hig/icon-button';
import '@hig/icon-button/build/index.css';

Typical usage

Use the name prop to render a provided icon by name.

function MyComponent() {
  return (
    <IconButton
      name="assets"
      onClick={() => console.log('Clicked it.')}
    />
  );
}

Providing a custom SVG

import myIcon from 'my-icon.svg';

function MyComponent() {
  return (
    <IconButton
      svg={myIcon}
      onClick={() => console.log('Clicked it.')}
    />
  );
}

FAQs

Package last updated on 09 May 2018

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