npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@trend/icon

v0.6.0

Published

TREND Components icons.

Downloads

7

Readme

React Icon Components

Use TREND svg icons for consistent visual and decorative cues.

Installation

## Has peer dependency with react and react-dom
npm install react react-dom
npm install @trend/icon

Basic Usage

With a module bunlder like webpack, use as you would anything else:

// Using ES6 modules.
@import React from 'react';
@import withIcon from '@trend/icon';

const Menu = props => <svg viewBox="..." {...props}>...</svg>;

export default withIcon(Menu);

Import already wrapped icons:

// Using ES6 modules.
@import React from 'react';
@import Bell from '@trend/icon/Bell';

// Render a basic TREND component button.
function Alert() {
  return <Bell size={3} />;
}

// => <svg role="img" viewBox arialabelledBy style>...</svg>

Props

All props are passed through directly to the svg itself, with the exception of the width, height, and style props.

size

number||string | optional, defaults to 1

Adding a size will adjust the width and height attributes of the svg to preserve the 1:1 ratio required for the icon.

unit

string | optional, defaults to rem and can only be one of rem or em

Change the unit of measurment for the size of the icon.

style

object | optional, see default styles below, any additional styles

const defaultStyles = {
  display: 'inline-block',
  fill: 'currentColor',
  verticalAlign: 'middle'
};

Icons

All icons can be imported directly by file name or from main module import.

import { Bell } from '@trend/icon';
import Bell from '@trend/icon/bell';

Name | Display name --- | --- Add | WithIcon(Add) App | WithIcon(App) Bell | WithIcon(Bell) Calendar | WithIcon(Calendar) Camera | WithIcon(Camera) Check | WithIcon(Check) ChevronLeft | WithIcon(ChevronLeft) ChevronRight | WithIcon(ChevronRight) Close | WithIcon(Close) Cog | WithIcon(Cog) Comment | WithIcon(Comment) Crop | WithIcon(Crop) Data | WithIcon(Data) Edit | WithIcon(Edit) Ellipsis | WithIcon(Ellipsis) Exclamation | WithIcon(Exclamation) Filter | WithIcon(Filter) Location | WithIcon(Location) Lock | WithIcon(Lock) Menu | WithIcon(Menu) Message | WithIcon(Message) Move | WithIcon(Move) Mute | WithIcon(Mute) Pause | WithIcon(Pause) Play | WithIcon(Play) Print | WithIcon(Print) Profile | WithIcon(Profile) QuestionMark | WithIcon(QuestionMark) Search | WithIcon(Search) Share | WithIcon(Share) Sort | WithIcon(Sort) SoundOn | WithIcon(SoundOn) Stats | WithIcon(Stats) Tags | WithIcon(Tags) Trash | WithIcon(Trash) Unlock | WithIcon(Unlock) Users | WithIcon(Users) Video | WithIcon(Video) Weblink | WithIcon(Weblink) ZoomIn | WithIcon(ZoomIn) ZoomOut | WithIcon(ZoomOut)

Building Icons

All icons are generated using svgr. All raw svg files reside in the svgs directory and to re-compile the svgs into React components just run the npm run build:icons command. Running command will auto-generate the main index.js as well.