Socket
Book a DemoInstallSign in
Socket

react-cuboid

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cuboid

A cuboid component for react

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

react-cuboid

A cuboid component for react

NPM JavaScript Style Guide

Install

npm install --save react-cuboid

or

yarn add react-cuboid

Demo

cube

Usage

Cuboid example

import React from 'react'
import Cuboid, { Front, Back, Top, Bottom, Left, Right } from 'react-cuboid'

const App = () => {
  return (
    <div style={{ marginLeft: 200, marginTop: 200 }}>
      <Cuboid
        width={150}
        height={200}
        depth={250}
        sideStyle={{borderStyle: 'solid'}}
        rotateX={10}
        rotateY={20}
        >
          <Front> {/** front side */} </Front>
          <Back> {/** back side */} </Back>
          <Top> {/** top side */} </Top>
          <Bottom> {/** bottom side */} </Bottom>
          <Left> {/** left side */} </Left>
          <Right> {/** right side */} </Right>
        </Cuboid>
      </div>
  );
}

Cube example

import React from 'react'
import Cuboid, { Front, Back, Top, Bottom, Left, Right } from 'react-cuboid'

const App = () => {
  return (
    <div style={{ marginLeft: 200, marginTop: 200 }}>
      <Cuboid
        size={100}
        sideStyle={{borderStyle: 'solid'}}
        rotateX={10}
        rotateY={20}
        >
          <Front> {/** front side */} </Front>
          <Back> {/** back side */} </Back>
          <Top> {/** top side */} </Top>
          <Bottom> {/** bottom side */} </Bottom>
          <Left> {/** left side */} </Left>
          <Right> {/** right side */} </Right>
        </Cuboid>
      </div>
  );
}

Props

nametypedefault
size?number100
width?numberprops.size
height?numberprops.size
depth?numberprops.size
perspective?number1000
perspectiveX?number50
perspectiveY?number50
rotateX?number0
rotateY?number0
rotateZ?number0
skewX?number0
skewY?number0
sideStyle?number{}

License

MIT © dopey2

FAQs

Package last updated on 10 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.