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

@naturacosmeticos/natds-icons

v1.27.5

Published

A collection of icons for Natura & Co. Design System

Downloads

7,688

Readme

Natura Design System - Icons

Icon Names 📌

You can search for the names of the icons you need in our Natura Design System website.

ℹ️ Note that the availability of the icons may vary depending on the version you use, so always try to use the latest stable version of natds-icons.

How to use

Using NatDS Libraries

If you are developing for theses platforms, you can check out our component libraries for: Android (natds-android), iOS (natds-ios), React (natds-web), and React Native (natds-rn).

Here you can find more instructions on how to use natds-icons along with those libraries:

Without Using NatDS Libraries

Web development

Installation
  • Using npm:
npm install --save @naturacosmeticos/natds-icons
  • Using yarn:
yarn add @naturacosmeticos/natds-icons
  • Using CDN:

This library is available to use from both unpkg and jsdelivr. You can load the files from this networks using URLs that points directly to the files you want, like this:

https://unpkg.com/@naturacosmeticos/natds-icons@latest/dist/natds-icons.css

Or this:

https://cdn.jsdelivr.net/npm/@naturacosmeticos/natds-icons@latest/dist/natds-icons.css

⚠️ You can replace latest by the better version for your project. We recommend you always use the latest stable version.

Check out unpkg and jsdelivr to see the files you can import and their complete URLs.

ℹ️ Working with TypeScript?

We also provide declaration files for CSS and JSON, so you can avoid the "Could not find a declaration file for module" error.

Using CSS + icon font

Load the font icons from the package @naturacosmeticos/natds-icons:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@naturacosmeticos/natds-icons@latest/dist/natds-icons.css">

or load it from node_modules with a module bundler like webpack or rollup

main.js:

import React from 'react';
import '@naturacosmeticos/natds-icons/natds-icons.css';

webpack.config.js:

module.exports = {
  module: {
    loaders: [
      { test: /\.css$/, loader: "style-loader!css-loader" },
      // ...
    ]
  }
};

After that, you can insert an icon by adding the name of the icon class to any inline HTML element. Like this example:

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@naturacosmeticos/natds-icons@latest/dist/natds-icons.css">
</head>
<body>

    <i class="natds-icons natds-icons-filled-action-love"></i>

</body>
</html>

The <i> and <span> elements are widely used to add icons.

All the icons can be customized with CSS (size, color, shadow, etc.), but we recommend using the class names provided to make it easier to stick to our overall design guidelines.

If you need a customization that is not provided yet, please consider contributing, or you can create an issue.

Using SVG

You can use the SVG files for the icons individually by importing them from the ./dist/svg folder or CDN. Like this example:

<!DOCTYPE html>
<html>
<body>

    <img src="https://cdn.jsdelivr.net/npm/@naturacosmeticos/[email protected]/dist/svg/filled-action-rating.svg" alt="star icon">

</body>
</html>

Or like this:

<!DOCTYPE html>
<html>
<body>

    <a href="/" class="rating-star">
      Rate this product!
    </a>

</body>
</html>
.rating-star {
  display: block;
  text-indent: -9999px;
  background: url(https://cdn.jsdelivr.net/npm/@naturacosmeticos/[email protected]/dist/svg/filled-action-rating.svg);
}

Android development

In order to use natds-icons in an Android project, you must add a new dependency. To download the dependency it is necessary to use a Github active account. You Can create in your project a file - for ex: github_credentials- with properties and fill it with Github username and Access token. For getting your GitHub access token see the Tutorial. Its important to check read:packages when generating you password. In the file build.gradle, insert these informations:

repositories {
    def githubProperties = new Properties()
    def githubFile = rootProject.file("github_credentials.properties")
    if (githubFile.exists()) {
        githubProperties.load(new FileInputStream(githubFile))
    }
    //To Access Nat DS Icons dependency at Github Packages
    maven {
        name = "natds-commons"
        url = uri("https://maven.pkg.github.com/natura-cosmeticos/natds-commons")
        credentials {
            username = githubProperties['github.username'] ?: System.getenv("GITHUB_USERNAME")
            password = githubProperties['github.password'] ?: System.getenv("GITHUB_API_KEY")
        }
    }
}

And:

dependencies {
implementation "com.natura:icons:$rootProject.<version>"
}

With the dependency configured, you can access our icons as drawables. 😃

iOS development

To use NatDS Icons, you MUST add a new pod to your project. You must specify it in your Podfile:

target '<Your Target Name>' do
    pod 'NatDSIcons'    
end

Check the documentation on how to use icons.

How to contribute

To contribute, please check our Contributing guidelines.