Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 765 Bytes

README.md

File metadata and controls

32 lines (26 loc) · 765 Bytes

run example with yarn && yarn start, or just visit https://hturan.com/three-stacks

move mouse / tilt device to alter perspective offset, mouse wheel to alter perspective depth

<ThreeStacks /> expects four props —

  • x — an array of values to render across the x-axis
  • y — an array of values to render across the y-axis
  • z — an array of values to render across the z-axis
  • render — a render function that takes x, y, and z values and returns a component

like so —

<ThreeStacks
  x={borderWidths}
  y={borderStyles}
  z={colors}
  render={(x, y, z) => (
    <Button
      style={{
        borderStyle: y,
        borderWidth: x,
        borderColor: z,
        color: z
      }}
    />
  )}
/>