react-ts-cutout
TypeScript icon, indicating that this package has built-in type declarations

0.1.1-b • Public • Published

React Cutout

https://github.com/gerardmarquinarubio/ReactCutout https://www.npmjs.com/package/react-ts-cutout

React Cutout is a simple component that allows you to create a nice title cutout effect by simply invoking the component. Try on codesandbox.io.

Installation

npm i react-ts-cutout

Example usage

import Cutout from "react-ts-cutout";

export default function myComponent() {
  return (
    <Cutout src="/image.jpg" backgroundColor="white">
      <h1>Nice titles</h1>
      <h2>Made simple</h2>
    </Cutout>
  );
}

Props

src: string

Source of the background image. Required

backgroundColor : 'white' | 'black' | string;

Color of the background. Required. Accepts any CSS color notation.

mode?: Property.MixBlendMode;

Blend mode CSS property. Defaults to 'darken' or 'lighten' depending on backgroundColor.

Package Sidebar

Install

npm i react-ts-cutout

Weekly Downloads

149

Version

0.1.1-b

License

BSD-3-Clause

Unpacked Size

17.2 kB

Total Files

8

Last publish

Collaborators

  • gerardmarquinarubio