Giter Site home page Giter Site logo

jcampillo1207 / react-ethereal-icons Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14.24 MB

Ethereal Icons is a React icon library that provides a collection of customizable and scalable SVG icons for modern web applications. Enhance your UI with beautiful, consistent, and highly customizable icons.

License: ISC License

JavaScript 0.96% TypeScript 99.04%
ethereal icons package react svg-icons

react-ethereal-icons's Introduction

Ethereal Icons

Ethereal Icons is a React icon library that provides a collection of customizable and scalable SVG icons for modern web applications. Enhance your UI with beautiful, consistent, and highly customizable icons.

Installation

Install the library using npm or yarn:

# Using npm
npm install ethereal-icons@latest

# Using yarn
yarn add ethereal-icons@latest

Usage

Importing Icons

You can import individual icons directly from the library:

import React from "react";
import { User, Apple } from "ethereal-icons";

const App = () => (
  <div>
    <User size={48} color="blue" className="custom-class" />
    <Apple size={48} color1="red" color2="yellow" className="custom-class" />
  </div>
);

export default App;

Universal Icon Component

The library also provides a universal icon component that allows you to dynamically render any icon by name:

import React from "react";
import { Ethereal } from "ethereal-icons";

const App = () => (
  <div>
    <Ethereal name="User" size={48} color="blue" className="custom-class" />
    <Ethereal
      name="Apple"
      size={48}
      color1="red"
      color2="yellow"
      className="custom-class"
    />
  </div>
);

export default App;

Using Types

Ethereal Icons also provides TypeScript support to ensure type safety and autocompletion in your code editor. The IconName type includes all the available icon names, allowing you to use them with confidence.

import React from "react";
import { Ethereal, IconName } from "ethereal-icons";

const icons: IconName[] = ["User", "Apple", "AnotherIcon"];

const App = () => (
  <div>
    {icons.map((icon) => (
      <Ethereal key={icon} name={icon} size={48} className="custom-class" />
    ))}
  </div>
);

export default App;

Props

  • size: Sets the width and height of the icon. Defaults to 24.
  • color: The primary color of the icon. Defaults to the current color.
  • strokeWidth: Sets the stroke width for icons with stroke properties. Defaults to 2.
  • color1: The first fill color for icons with two colors. Defaults to the original color of the SVG.
  • color2: The second fill color for icons with two colors. Defaults to the original color of the SVG.
  • className: Adds a custom class to the SVG element.

Issues and Suggestions

If you encounter any issues or have suggestions for improvements, please reach out on Twitter: @Chema12071

License

This project is licensed under the ISC License. See the LICENSE file for more details.


Author: José Campillo
Website: ethereal.dev
Twitter: @Chema12071
GitHub: josecampillo

react-ethereal-icons's People

Contributors

jcampillo1207 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.