smooth-component

a react component for implement container or element with smoothing corners.

Usage no npm install needed!

<script type="module">
  import smoothComponent from 'https://cdn.skypack.dev/smooth-component';
</script>

README

Smooth Component

a react component for implement container or element with smoothing corners.

image

Install

npm install --save smooth-component

Usage

import React, { Component } from 'react'

import Smooth from 'smooth-component'

class Example extends Component {
  render() {
    return (
      <Smooth.div
        borderRadius={100}
        cornerSmoothing={100}
        style={{ width: 200, height: 200 }}
      >
        ...
      </Smooth.div>
    )
  }
}

Supported tags : div, img, p, h1, h2, h3, h4, h5, h6

Props

key type example
borderRadius number / string ( px or % ) 93 / 93px / 93%
cornerSmoothing number / string ( % ) 63 / 63%