Git Product home page Git Product logo

khangdao2112 / periodic-table Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tamalchowdhury/periodic-table

0.0 0.0 0.0 1.97 MB

Interactive Periodic Table which I made with React.js and CSS Grid. I was trying to memorize all the elements and thought, hey can I make this peculiar layout with my current CSS skills? I finally did

Home Page: https://periodictableonline.netlify.app

License: Apache License 2.0

JavaScript 86.80% CSS 10.79% HTML 2.41%

periodic-table's Introduction

The Periodic Table of Elements

Made with CSS Grid, React and Science! See it in Action: PeriodicTable.website

Running it on your computer

You will need Node.js installed on your computer. Follow this tutorial to setup a local development environment with Node and Git bash

Clone the repository into your computer

git clone https://github.com/tamalchowdhury/periodic-table.git

Go into the new directory:

cd periodic-table

Install the dependencies with yarn or npm

yarn

Run the app locally by running yarn start or npm start

yarn start

Visit http://localhost:3000

Periodic Table

How it was made?

I made the layout using CSS grid. The table is a bunch of boxes in 18 columns, arranged in a funny way.

I used viewport width to set most of the element dimensions, text sizes, so that the table will scale according to screen sizes. Still, please test it on your end and send me a PR.

I created each box with a <div> with a class of element and number like: element-1

I used emmet to auto populate 118 boxes.

The unique class names helped me arrange them by position in CSS. For example in Element 57 and 89 when the Lathanides and Actinoids split the table, I made them seperate and pushed down the markup. See the main css file on how I did it.

After I arranged the elements the way it is, I then transitioned over React.

React allowed me to make the items interactive. I found a handy JSON that had all the element info which I used to dynamically populate the symbol names and other information. This saved me a lot of time and error making this table.

You can read the detailed blog Post here: How I made The Periodic Table with CSS Grid and React

periodic-table's People

Contributors

tamalchowdhury avatar khangdao2112 avatar dependabot[bot] avatar davidxll avatar b-dantas 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.