Giter Site home page Giter Site logo

burakyilmaz321 / pyheroicons Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 365 KB

Ready to use Tailwindcss Heroicons components for Python

License: MIT License

Shell 22.11% Python 77.89%
component django fastapi flask heroicons icon python svg tailwind tailwindcss ui

pyheroicons's Introduction

pyheroicons

PyPI version License: MIT Python Versions Package Status CI Build

pyheroicons is a Python library that offers a convenient interface to the Tailwind CSS Heroicons icon set. This library allows developers to easily integrate Heroicons into Python-based web frameworks such as Django, Flask, or FastAPI by generating SVG icon template strings.

Installation

To install pyheroicons, simply use pip:

pip install pyheroicons

Usage

Import heroicon function from pyheroicons and use it to generate icon templates:

from pyheroicons import heroicon

heroicon API

  • name The name of the Heroicon (e.g., "academic-cap").
  • variant The variant of the icon ("outline", "solid", "mini", or "micro").
  • cls Optional. A CSS class to apply to the SVG icon.
  • strokewidth Optional. The stroke width of the icon. Only applicable if the original SVG contains a stroke-width attribute. i.e. Only works for the "outline" variant.

Example usage

icon_svg = heroicon(name="academic-cap", variant="outline", cls="icon-class", strokewidth="2")
print(icon_svg)

Keeping Up-to-Date

pyheroicons aims to stay up-to-date with the Heroicons library. When a new version of Heroicons is released, pyheroicons will also release a corresponding version to ensure compatibility.

pyheroicons Version Heroicons Version
1.1.0 2.1.1

Contributing

Contributions to pyheroicons are welcomed!

License

pyheroicons is released under the MIT License.

pyheroicons's People

Contributors

burakyilmaz321 avatar

Stargazers

Burak Çınar avatar Uğur Özyılmazel avatar  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.