Material Bread
v0.2.10
Home
Getting Started
React Native
Web
Electron
MacOS
Windows
NextJs
Expo
Vue Native
Style
Font
Icons
Theme
Components
Appbar
Searchbar
Appbar Bottom
Avatar
Backdrop
Badge
Banner
Bottom Navigation
Bottom Navigation Item
Button
Card
CardActions
CardContent
CardHeader
CardMedia
Checkbox
Chip
DataTable
DataTableCell
DataTableHeader
DataTablePagination
DataTableRow
Dialog
Divider
Drawer
DrawerHeader
DrawerItem
DrawerSection
DrawerBottom
Fab
Speed dial
Icon
IconButton
List
ListExpand
ListItem
ListSection
Menu
MenuItem
Paper
Progress Bar
Progress Circle
Radio Button
Ripple
Select
SheetBottom
SheetSide
Slider
Snackbar
SwipeNav
Switch
Tabs
Tab
Textfield
Searchfield
ToggleButton
ToggleButtonGroup
Tooltip
Typography
Utils
Anchor
Color
Hoverable
Shadow
Storybook
Showcase
Contributing
Library
Docs
About

Paper

Material Design has three-dimensional qualities that are reflected in its use of surfaces, depth, and shadows. - Material Docs

import { Paper } from 'material-bread';

Component #

The Paper copmonent is a base component for displaying surfaces with shadow.
Live Editing
class PaperDemo extends React.Component {
  constructor(props) {
    super(props)
    this.state = {

    }
  }
  render() {
    return (
      <View style={{flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap'}}>
        <Paper
            style={{
              height: 100,
              width: 100,
              alignItems: 'center',
            }}
            shadow={2}
          />
          <Paper
            style={{
              height: 100,
              width: 100,
            }}
            shadow={4}
          />
          <Paper
            style={{
              height: 100,
              width: 100,
            }}
            shadow={8}
          />
      </View>
    );
  }
}

Usage #

import React, { Component } from 'react';
import { View } from 'react-native';
import { Paper } from 'material-bread';

class PaperDemo extends React.Component {
  constructor(props) {
    super(props)
    this.state = {

    }
  }
  render() {
    return (
     <View style={{flexDirection: 'row'}}>
      <Paper
          style={{
            padding: 8,
            height: 100,
            width: 100,
            alignItems: 'center',
          }}
          elevation={2}
        />
        <Paper
          style={{
            padding: 8,
            height: 100,
            width: 100,
            marginTop: 30,
            alignItems: 'center',
            justifyContent: 'center',
          }}
          elevation={4}
        />
        <Paper
          style={{
            padding: 8,
            height: 100,
            width: 100,
            marginTop: 30,
            alignItems: 'center',
            justifyContent: 'center',
          }}
          elevation={8}
        />
     </View>
    );
  }
}

Props #

Name
Description
Type
Default
radius
Border Radius for paper
number
shadow
Sets shadow on all platforms
number
style
Styles root element
object