Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-interaction

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-interaction

Collection of components for interaction

  • 1.1.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
42
increased by7.69%
Maintainers
1
Weekly downloads
 
Created
Source

react-interaction

Collection of components for interaction

NPM JavaScript Style Guide

📢️ Please check it. Currently, this module supports React 16.8 and later.

Components

  • Toast popup
  • Notice
  • Check
  • Tooltip

Demo

Example

Install

npm install --save react-interaction

Usage

import { toast, notice, check, Tooltip } from 'react-interaction';

Toast

toast(message, options)

options

NameTypeDefaultDescription
timenumber3000The millisecond time that the message is displayed.
classNamestring
styleCSSProperties

Notice

Promise based notice component such as alert

notice(message, options).then(() => console.log('closed'));

options

NameTypeDefaultDescription
dimmedClassNamestring
dimmedStyleCSSProperties
contentClassNamestring
contentStyleCSSProperties
messageClassNamestring
messageStyleCSSProperties
okClassNamestring
okStyleCSSProperties
okTextstring'OK'

Check

Promise based check component such as confirm

check(message, options).then(isConfirmed => console.log(isConfirmed));

options

NameTypeDefaultDescription
dimmedClassNamestring
dimmedStyleCSSProperties
contentClassNamestring
contentStyleCSSProperties
messageClassNamestring
messageStyleCSSProperties
okClassNamestring
okStyleCSSProperties
okTextstring'OK'
cancelClassNamestring
cancelStyleCSSProperties
cancelTextstring'Cancel'

Tooltip

The position of the tooltip is calculated automatically.

<Tooltip message="Tooltip message">tooltip</Tooltip>

props

NameTypeDefaultDescription
styleCSSProperties
classNamestring
messageReactNode
messageStyleCSSProperties
messageClassNamestring
togglebooleanfalse

License

MIT © almond-bongbong

Keywords

FAQs

Package last updated on 27 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc