React Arts is a library of react functional component which provides canvas sketch board in the app.

Overview

🎨 React Arts

React Arts is a library of react functional component which provides canvas sketch board in the app.

This library contains two react component CanvasSketch and CanvasSketchTool

LIVE DEMO

react_arts

Installation

This module is installed via npm:

npm install react-arts

CanvasSketch

CanvasSketch component appends simple canvas where a user can sketch using mouse or touch behaviour on screen.

); } export default App;">
import './App.css';
import { CanvasSketch } from 'react-arts';

function App() {

  const [clearCanvas, setClearCanvas] = useState()

  return (
    <div className="App">
      <CanvasSketch 
        height={450} 
        width={750}
        getClearCanvas = {setClearCanvas}
    />
    <button onClick={clearCanvas}>Clear Frame</button>
    </div>
  );
}

export default App;

API

Name Type Required Default Description
height Number true - Height of canvas
width Number true - Width of canvas
color String false black Color for sketch
lineWidth Number false 4 Width of the pen
lineCap String false round Shape of pen for sketch
option String false pen Option for sketch [pen / paint]
getClearCanvas Function false - Returs clearCanvas function to setState

CanvasSketchTool

CanvasSketchTool component is advance version of CanvasSketch which also comes with a tool kit to change and use properties like color, erase, line width, clear canvas, floodfill.

); } export default App;">
import './App.css';
import { CanvasSketchTool } from 'react-arts';

function App() {

  return (
    <div className="App">
      <CanvasSketchTool
        height={450} 
        width={750} 
    />
    </div>
  );
}

export default App;

API

Name Type Required Default Description
height Number true - Height of canvas
width Number true - Width of canvas

Author

Satyam Lohiya

You might also like...
Insomnia-react-app - A react app that will help you relax and sleep better
Insomnia-react-app - A react app that will help you relax and sleep better

insomnia - a sleep inducer app An app that will help you relax and sleep better.

@use-gesture is a library that let you bind richer mouse and touch events to any component or view.
@use-gesture is a library that let you bind richer mouse and touch events to any component or view.

👇Bread n butter utility for component-tied mouse/touch gestures in React

hCaptcha Component Library for Solid

hCaptcha is a drop-replacement for reCAPTCHA that protects user privacy, rewards websites, and helps companies get their data labeled.

Reactivated.app is an open-source app that scans your JS dependencies every 4 hours and generates cool dashboards
Reactivated.app is an open-source app that scans your JS dependencies every 4 hours and generates cool dashboards

Reactivated.app is an open-source app that scans your JS dependencies every 4 hours and generates cool dashboards

Solana-base-app - Solana-base-app is for Solana beginners to get them up and running fast
Solana-base-app - Solana-base-app is for Solana beginners to get them up and running fast

solana-base-app solana-base-app is for Solana beginners to get them up and runni

:fire: An extremely fast, React-like JavaScript library for building modern user interfaces
:fire: An extremely fast, React-like JavaScript library for building modern user interfaces

Inferno is an insanely fast, React-like library for building high-performance user interfaces on both the client and server. Description The main obje

📝 Self-configuring product tour library for React
📝 Self-configuring product tour library for React

React Spotlight Tour A self-configuring tutorial library for React. Blog | Docs | Demo | npm Features Clean and unobtrusive overlay to highlight the i

A lightweight react global state management library

Reate A lightweight react global state management library. ✨ Feature Simple and easy to use, only three APIs

A state management library for React, heavily inspired by vuex
A state management library for React, heavily inspired by vuex

A state management library for React, heavily inspired by vuex

React component to blur image backgrounds using canvas.

React Blur React component for creating blurred backgrounds using canvas. Live demo Installation npm install react-blur --save Usage var Blur = requir

Javier Bórquez 439 Sep 27, 2022
:tada: React Universal Hooks : just use****** everywhere (Functional or Class Component). Support React DevTools!

react-universal-hooks React Universal Hooks : just use****** everywhere. Support React >= 16.8.0 Installation Using npm: $ npm install --save react-un

Salvatore Ravidà 177 Oct 10, 2022
This command line can be used to convert React class components to become functional components

class-to-function This command line can be used to convert React class components to become functional components. Installation Install it as a global

null 4 Mar 8, 2022
Cute-switch - A functional switch to replace switch statements

Cute Switch This package brings in a cute switch as opposed to the built in sill

Andreas Fyrstelin Fuller 3 Jan 21, 2022
We have updated our application over to using hooks and functional components to replace any class components we had before.

Crwn hooks We have updated our application over to using hooks and functional components to replace any class components we had before. How to fork an

Shazil Sattar 2 Feb 10, 2022
React Navigation for React js that tries to ensure that the elements of the navigators display correctly on devices with notches and UI elements which may overlap the app content.

React Navigation for React js that tries to ensure that the elements of the navigators display correctly on devices with notches (e.g. iPhone X) and UI elements which may overlap the app content.

MohammadAli Karimi 11 Nov 27, 2022
A superset of JavaScript which gives you static types and powerful tooling in Visual Studio Code

TypeScript Example npx create-react-native-app -t with-typescript TypeScript is a superset of JavaScript which gives you static types and powerful too

Michael Czuba 1 Aug 20, 2022
Extension for vscode, which generates the value of a variable from a type definition

Extension for vscode, which generates the value of a variable from a type definition

K.Himeno 1 Feb 25, 2022
A React library to show an administrative UI for the Mock Service Worker JS library

A React library to show an administrative UI for the Mock Service Worker JS library

Intesys 3 Nov 17, 2022
DataCamp's Design System and React component library.

DataCamp's Design System and React component library.

DataCamp 10 Oct 17, 2022