Newbie Paintball Master

    @biptik/squircle
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.3 • Public • Published

    Squircle React SVG Mask


    ts license

    Description

    React component for create Superellipse (or Squircle) mask using svg and css mask-image attribute.

    Installation

    npm install @biptik/squircle
    

    Usage

    It couldn't be easier!

    import Squircle from "@biptik/squircle";
    
    <Squircle style={{ width: 64, height: 64 }}>{/* <img /> */}</Squircle>;

    Props

    prop type default description
    ratio1 number 0.0586 [0 ~ 0.5] width ratio
    ratio2 number 0.332 [0 ~ 0.5] width ratio
    pixelRatio1 number [0 ~ width/2] in pixel
    pixelRatio2 number [0 ~ width/2] in pixel
    children ReactNode ex.: image, etc.

    Install

    npm i @biptik/squircle

    DownloadsWeekly Downloads

    4

    Version

    0.0.3

    License

    none

    Unpacked Size

    13.2 kB

    Total Files

    14

    Last publish

    Collaborators

    • kamovski