Code Monkey home page Code Monkey logo

todo-list-react-hooks's Introduction

Create Todo React App easily with Material UI

To begin:
npx create-react-app my-app
cd my-app
npm start

Delete all default mark up.

For components create folder #components in #src folder and place there your react components. In my project you can see: Form.jsx, FormInput.jsx, List.jsx. You can create as many components as you want and name it how you like.

In this project Material-UI is used. To install run:
npm install @material-ui/core

Material-UI was developed based on the Roboto font. The Roboto font will not be automatically loaded into Material-UI. So be sure to install it.

To install run:
npm install fontsource-roboto

Then import it in "index.js". To do so write in "index.js":
import 'fontsource-roboto';

To use icons run:
npm install @material-ui/icons

Button example:

import  React from 'react';
import Button from "@material-ui/core/Button";

// custom styles with Material UI
const useStyles = makeStyles({
    root: {
        background: 'linear-gradient(45deg, gray 30%, black 90%)',
        border: 0,
        color: 'white',
        height: 30,
        padding: '0 10px',
        whiteSpace: 'nowrap',
        margin: '15px 0 0 20px',
    }
});


const Button = () => {
   const classes = useStyles();
    
   return (
      <Button
           type="submit"
           alt="add-note"
           className={classes.root}
       >
           Add task
       </Button>
     )
     
export  default Button;

Then you can see the result - button "ADD TASK" look like:

Button example

That was easy, right :)

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.