πŸŒ€ Insert Awesome Shapes into Your React Site with Ease

Overview
preview

React Awesome Shapes

πŸŒ€ Insert Awesome Shapes into Your React Site with Ease.

NodeJS NPM code style: prettier
Netlify Status License Maintenance Website Price

Loved the project? Please consider donating to help it improve!

Consider following DevSense on YouTube.

If you want to discuss about something, then you can ask on official Discord Server.

⭐ Star us on GitHub β€” it helps!

Getting Started 🎬

The easiest way to use one of the shapes from Awesome Shapes is to install the NPM package and import the particular shape to use it.

Install NPM Package

npm install react-awesome-shapes

Import And Use

... ); } export default ShapeComponent;">
import { ShapeName } from "react-awesome-shapes";
...
function ShapeComponent(props) {
    return (
        ...
        <ShapeName {...passParametersToCustomise} />
        ...
    );
}

export default ShapeComponent;

The shapes are very easier to import and use wherever you want and in any web framework that uses NPM.
You can set different sizes of different variety of shapes by passing props.

Read the complete in detail documentation in the Usage section.

Usage

Currently, the package contains shapes: Circle, Donut, CircleGrid, Square, Diamond, PolygonCard, Triangle, Hexagon.

All of the shapes currently present in the package are made responsive and the responsiveness is customisable too. To do that, one of the prop to each shape component is breakpoints which is an array of numbers. It represents the breakpoints in which you will define the responsiveness. By default, breakpoints are defined as [600, 900, 1200]. So, you can pass array of 4 elements for size prop which corresponds to <=600, 600 <=900 , 900 <=1200 , >1200. Similarly, you can pass other props in form of array if you want to define different sizes for different breakpoints. You can see list of props corresponding to each shape in the respective implementation file linked above with shape.

By default, all the shapes have position: absolute; so that you can define the coordinates to put the shapes to exact position. But you can change the position attribute in case you want.

Basic usage of the Shape in your react site is illustrated on the project website.

License πŸ“„

This project is licensed under the MIT License - see the LICENSE.md file for details. You can use this project for personal as well as commercial purposes. But if you think you have modified the project and built something really good, we will humbly request you to raise the pull request and share with the opensource community.

Contributing πŸ’‘

β€ŒAwesome Shapes is created with the help of what is available for free on the internet and hence it will always be available for free. This makes it an open source project and everyone are welcome to contribute to different aspects of the project.

You may want to contribute on adding new shapes, fixing bugs, improving/refactoring code etc.

If you can help us with these, please don't hesitate to open a pull request or an issue. If you want to know about how to create pull request, then please refer to this youtube playlist.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Ashutosh Hathidara

πŸ’» 🎨 πŸ“– πŸ€” 🚧 πŸ”¬

Sachin Chaurasiya

πŸ“– πŸ’» πŸ€” πŸ“¦

Mohit Khairnar

πŸ€” πŸ’» 🎨 πŸ“–

anaghaachakrapani

🎨 πŸ€”

Aman Sethi

πŸ’»

judy-n

πŸ’»

Julien Bertazzo Lambert

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

References πŸ‘πŸ»

Gatsby Themes by @LekoArts was the biggest inspiration for this project.

Comments
  • diamond to square

    diamond to square

    I am trying to use the diamond shape but it's converted into a square. Actually, I am using className prop on the component for adding some cool animations. It stays for some time as a diamond and then it jumps back to square as shown in the image below! Screenshot 2022-03-02 at 7 58 53 PM

    Screenshot 2022-03-02 at 7 58 26 PM Screenshot 2022-03-02 at 7 58 21 PM bug 
    opened by Spyware007 9
  • Fix #2 Getting Error for

    Fix #2 Getting Error for "useMediaQuery" being called in loop.

    Fixes #2 This PR will include the following changes

    • Adding types package for react-responsive
    • Fixing Hook being called in loop issue.

    cc: @ashutosh1919

    opened by Sachin-chaurasiya 7
  • Getting Error for

    Getting Error for "useMediaQuery" being called in loop.

    React Hook "useMediaQuery" may be executed more than once. Possibly because it is called in a loop. React Hooks must be called in the exact same order in every component render

    @ashutosh1919 , please assign this to me.

    enhancement 
    opened by Sachin-chaurasiya 5
  • Fix: issue-45 diamond to square

    Fix: issue-45 diamond to square

    I work on fixing issue #45 which converts diamond shape in to square shape on animation. Closes #45

    Working example:- Please look right top corner for diamond shape

    https://user-images.githubusercontent.com/71748675/158029836-3b14c96e-202a-4159-9eba-70326f7e4a66.mov

    @Sachin-chaurasiya @Spyware007 @ashutosh1919

    opened by ShaileshParmar11 4
  • Move out all the typescript types in single file.

    Move out all the typescript types in single file.

    Currently, we have typescript types in all the files, we should move out those and keep them in a single file and use it from there. Also, instead of type make it interface.

    enhancement good first issue 
    opened by Sachin-chaurasiya 2
  • fix onHover issue

    fix onHover issue

    #85 Hi there I was working on this issue and I found out that to fix it I have to make some changes:

    those changes will affect the homepage shapes positions so please don't merge until repositioned the shapes

    1. Remove some css properties from StyledShape component [ position, top, bottom, left, & right] which inherit their values from the parent (BaseShape).
    2. Set zIndex value to unset instead of -1.
    3. Remove className property from BaseShape component.
    4. Add css property of type string to all shapes, this property is responsible for adding effects to a component like changing color on hover.
     <Heart
              color="red"
              css={`
                &:hover {
                  background: orange;
                }
                transition: 0.5s;
              `}
              position="initial"
              size="200px"
            />
    

    Please keep in mind that to change the color of Donut you have to change the border-color property and for CircleGrid you have to change the fill property and not the background.

    For example:

    <CircleGrid
              color="green"
              css={`
                &:hover {
                  fill: orange;
                }
              `}
              position="initial"
              size="100px"
            />
    
    <Donut
              color="yellow"
              css={`
                &:hover {
                  border-color: orange;
                }
              `}
              position="initial"
              size="100px"
              width="20px"
            />
    
    blocked 
    opened by essofyany 3
  • onHover the square background appears to change color

    onHover the square background appears to change color

    When I tried to use a simple color-changing effect on any shape the background container of the shape also changes color. I am trying to make an effect on hover to change the color!

    https://user-images.githubusercontent.com/89961974/159887373-b76381d0-22da-487c-96bd-9a9fed014105.mov

    Screenshot 2022-03-24 at 3 08 20 PM
    opened by Spyware007 2
  • Add Unit Tests for components

    Add Unit Tests for components

    Currently, we have 0% test coverage, we should add some unit tests for components so that we can easily debug if something is breaking in components. cc: @ashutosh1919

    enhancement 
    opened by Sachin-chaurasiya 4
  • Remove react-responsive

    Remove react-responsive

    Currently react-responsive takes 26% of the total size of the package. If we can remove the package, it will greatly reduce the size of the package. The alternative of react-responsive will be to build custom JS code that will check the screen size where it is executing and will select the value from the breakpoint array.

    enhancement 
    opened by ashutosh1919 1
  • Pass props to animate the shapes

    Pass props to animate the shapes

    We can create an directory of animations which will contains CSS animations which can be added to any shape by passing the appropriate props names to the shape component!

    enhancement 
    opened by Spyware007 3
Releases(v0.1.12)
Owner
Ashutosh Hathidara
❀️ TensorFlow, Python, ReactJS, GatsbyJS. Love to work on the end-to-end project which includes cross-framework implementations.
Ashutosh Hathidara
πŸŽ‰ toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!

toastify-react-native ?? toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense! De

Zahid Ali 29 Oct 11, 2022
πŸ’š Yet another mutli purpose discord bot, allowing you to maintain and manage your discord server with ease.

Jade Jade is once again another mutli purpose bot, allowing you to maintain and manage your discord server with ease. Completely open source or use th

Saige 1 Sep 13, 2022
Check EU Digitial Covid Certificates with ease and validate them against country and local rules.

Check EU Digitial Covid Certificates with ease and validate them against local or country rules. What is the purpose of CovidValidator? CovidValidator

Timo Koenig 10 Mar 14, 2022
βš›οΈ πŸš€ A progressive static site generator for React.

You are viewing the docs for v7 of React Static. You can browse all historical versions via Github branches! React Static A progressive static-site ge

React Static 10.2k Dec 27, 2022
A demo of a Shopify site using Astro and React.

Shopify + Astro + React A demo of a Shopify site using Astro and React. If you'd like to learn how it's built and how you can do the same, check out t

Cassidy Williams 97 Dec 28, 2022
Hacker-news-with-react - πŸ‘Ύ Consuming the hacker news api, i created a more modern design for than the current site.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

JoΓ£o Thomaz 1 Jan 3, 2022
Site para treinar minhas habilidades com o react no frontEnd (totalmente voltado para o aprendizado)

Tutorial Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you ca

JΓΊlia de Melo Albuquerque 3 Jan 31, 2022
An awesome tool to make Images and GIFs of your code!

Recoded An awesome tool to make Images and GIFs of your code! View Demo Β· Report Bug Β· Request Feature About The Project There are plenty of Apps like

Siddharth Roy 65 Dec 18, 2022
Transform SVGs into React components 🦁

Transform SVGs into React components ?? Try it out online! Watch the talk at React Europe SVGR transforms SVG into ready to use components. It is part

Greg BergΓ© 9.3k Jan 3, 2023
Tina is an open source editor that brings visual editing into React websites. Tina empowers developers to give their teams a contextual and intuitive editing experience without sacrificing code quality.

Tina is an open-source toolkit for building content management directly into your website. Community Forum Getting Started Checkout the tutorial to ge

Tina 8.2k Jan 1, 2023
Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.

Recoil Β· Recoil is an experimental set of utilities for state management with React. Please see the website: https://recoiljs.org Installation The Rec

Facebook Experimental 18.2k Jan 8, 2023
nivo provides a rich set of dataviz components, built on top of the awesome d3 and Reactjs libraries

nivo provides supercharged React components to easily build dataviz apps, it's built on top of d3. Several libraries already exist for React d3 integr

RaphaΓ«l Benitte 10.9k Dec 31, 2022
The Bookstore is a website similar to the "Awesome Books" website built in the previous module. You will create an MVP version of it that allows you to: Display a list of books. Add a book. Remove a selected book.

Bookstore The Bookstore is a website similar to the "Awesome Books" website built in the previous module. You will create an MVP version of it that al

Anuar Shaidenov 6 Jun 12, 2022
The Bookstore is a website similar to the "Awesome Books" website. Here we will create an MVP version of it that allows you to: Display a list of books, Add a book and Remove a selected book.

Book Store This is Book Store project. Built With HTML CSS JavaScript React Screenshot Live Demo Go Live ?? Getting Started Open dev branch Open VSCod

Tadesse Alemayehu 5 May 3, 2022
Demo site build in Umbraco v.9.0.0-beta004 and .NET Core 5.0

Umbraco v9 Demo Demo site build in Umbraco v.9.0.0-beta004 and .NET Core 5.0. About this solution: This is a demo site for Umbraco v9 build in the new

Dennis Adolfi 61 Dec 18, 2022
A forkable Next.js site w/ a blank custom Nextra theme (w/Tailwind)

Nextra Blank Custom Theme/Boilerplate Example A nearly blank MDX blog/content site powered by a custom Nextra theme (see components/layout.js) w/Tailw

Jared Palmer 91 Jan 6, 2023
TV Show App is an application that allows to searh tv shows based on user input. Each tv show is displayed in a Bulma Card component and when clicked, heads you to the official tv show site

TV SHOW APP TV Show App is an application that allows to search tv shows based on user input. Each tv show is displayed in a Bulma* Card component and

HENDEL SAMY 1 Dec 19, 2021
Repo for APE consulting's uHUB social event site.

HYL_Hackathon 2022 u-Hub Inspiration Interested in finding social and academic events but have no idea where to find them? Tired of looking through co

Cameron Faith 3 Mar 29, 2022
Grid-tool - Small tool that allows you to integrate a predefined or generated grid into your front-end development environment.

Grid tool Small tool that allows you to integrate a predefined or generated grid into your front-end development environment. Tool installation includ

hmongouachon 2 Jan 4, 2022