Giter VIP home page Giter VIP logo

mui-components's Introduction

MUI components for your React App

SETUP

  • npm install @mui/material @emotion/react @emotion/styled @mui/icons-material
  • npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

If you want to use these components in a seperate project:

  • Copy the contents of the mui-node-modules folder into the node_modules folder of your project.
  • In the name of space-saving, the mui-node-modules folder has not been pushed to GitHub. To retrieve these folders you will need to clone the @mui & @emotion node modules.

Importing all components

import {
  Container, Grid, Box, Button, IconButton, TextField,
  Checkbox, Radio, Switch, FormControl, AppBar, BottomNavigation,
  Drawer, Tabs, Tab, Paper, Card, Accordion, AccordionSummary,
  AccordionDetails, CircularProgress, LinearProgress, Snackbar,
  Alert, Avatar, Badge, Chip, List, ListItem, Table, TableBody,
  TableCell, TableHead, TableRow, Typography, Tooltip, Modal
} from '@mui/material';
import {AddIcon, DeleteIcon} from '@mui/icons-material/Add';

If you want to customise your components, use the sx prop. For example:

<Button sx={{ color="black" }}>Click here!</Button>

Follow this link for more info on customisation:

  • https://mui.com/material-ui/customization/how-to-customize/#the-sx-prop

Core Components and their Variants

Layout

  • Container

    • Variants: fixed, maxWidth
  • Grid

    • Options: container, item, spacing, direction, justify, alignItems
  • Box

    • Options: m, p, border, color, bgcolor

Inputs

  • Button

    • Variants: text, outlined, contained
    • Options: color, size, disabled
  • IconButton

    • Options: color, size, disabled
  • TextField

    • Variants: standard, outlined, filled
    • Options: multiline, size
  • Checkbox

    • Options: checked, disabled, indeterminate
  • Radio

    • Options: checked, disabled
  • Switch

    • Options: checked, disabled
  • FormControl

    • Options: variant, margin, fullWidth

Navigation

  • AppBar

    • Options: position, color
  • BottomNavigation

    • Options: value, showLabels
  • Drawer

    • Variants: permanent, persistent, temporary
  • Tabs

    • Options: value, variant, indicatorColor, textColor
  • Tab

    • Options: label, icon, disabled

Surfaces

  • Paper

    • Options: elevation, square, variant
  • Card

    • Options: raised
  • Accordion

    • Options: expanded, disabled

Feedback

  • CircularProgress

    • Options: size, thickness, value
  • LinearProgress

    • Options: variant, value
  • Snackbar

    • Options: open, autoHideDuration
  • Alert

    • Variants: filled, outlined, standard
    • Options: severity

Data Display

  • Avatar

    • Options: alt, src, variant
  • Badge

    • Options: badgeContent, color, variant
  • Chip

    • Options: label, color, variant, clickable
  • List

    • Options: dense
  • ListItem

    • Options: button, divider, selected
  • Table

    • Options: size, stickyHeader

Utils

  • Typography

    • Variants: h1, h2, h3, h4, h5, h6, subtitle1, subtitle2, body1, body2, caption, button, overline
  • Tooltip

    • Options: title, placement
  • Modal

    • Options: open

Icons

  • AddIcon
  • DeleteIcon

mui-components's People

Contributors

kieran-tahir avatar

Watchers

 avatar

Forkers

hub-2023

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.