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

@vaibhavp1725/react-ions

v6.4.9

Published

An open source set of React components that implement Ambassador's Design and UX patterns.

Downloads

361

Readme

React{ions}

CircleCI

React{ions} is a suite of React components that implement Ambassador's Design and UX patterns. They are designed to be re-usable and composable across large-scale web applications.

Check out our documentation site for live examples.

Installation

Ambassador's React{ions} is available as an npm package.

$ npm install react-ions

Prerequisites

React{ions} currently requires React 15.1+.

We use CSS Modules by default to import stylesheets written in SASS. In case you want to import the components already bundled with CSS, your module bundler should be able to require these SASS modules.

Example Webpack App

Here is an example React{ions} Webpack app to get you started.

Basic Usage

In this minimal example, we import a Button with styles already bundled:

import React from 'react'
import Button from 'react-ions/lib/Button'

<Button>I am a Button</Button>

Live examples and more info documentation site.

Icons

To limit the number of network requests, this library dynamically generates an .svg sprite, to handle our user interfaces. The list of available icons is here: http://reactions.getambassador.com/foundations/iconography.

The list is primarily made up of Material Icons. However, there are a few social icons that we have added on our own.

If you've cloned the React:ions library, and wish to add/remove Material icons, or add custom (eg: non-Material) icons, to the sprite, follow the directions below.

To add a Material Icon to the svg sprite:

  • Search for the icon on the Material Icon site.
  • Open the master list /react-ions/src/assets/icons/master-list.js, and add the icon to the material array.
    • The category of the icon is needed to construct the path.
    • The hash after the path will be the name prop as passed into the React:ions Icon component.
    • All Material icon names should be prefixed with md-.
  • Stop the app, and run npm run build:sprite.
  • Run the app again, and go to: http://localhost:3000/foundations/iconography.
  • Your icon will be visible in the list.

To make a Custom Icon available in our apps:

  • Follow the instructions for adding a Material icon, however instead you will add to the mbsy array, and include a raw .svg file here: /react-ions/src/assets/icons/svg.
  • Open the new svg in an editor of your choice.
  • Remove the auto-generated code eg: title, desc, <— comments —>.
  • Remove the xml wrapper.
  • Remove any fill attributes from path or group nodes.
  • Save.
  • Run npm run build:sprite.
  • Open /docs/src/app/pages/components/Icons/ExampleCustom.js.
  • Replace the name attribute with mbsy-[new icon name].
  • Run npm start and hit http://localhost:3000/components/icons.
  • The icon should inherit the custom color and size.

License

This project is licensed under the terms of the MIT license