New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

js-dynamic-island

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

js-dynamic-island

A message prompt interaction effect, inspired by the excellent IOS dynamic island animation interaction

latest
Source
npmnpm
Version
2.1.6
Version published
Weekly downloads
7
250%
Maintainers
1
Weekly downloads
 
Created
Source

js-dynamic-island

U59dIv.png

Description

A message prompt interaction effect, inspired by the excellent IOS dynamic island animation interaction

Live Demo

  • Demo

Install

$ npm i js-dynamic-island

Quick Start

import { BubbleMessage, FoldMessage, MessageBox, ProgressBox, Rate, Spinner, AddToCart } from 'js-dynamic-island'
import "../node_modules/js-dynamic-island/style.css";

// BubbleMessage
BubbleMessage({
  user: 'zack',
  message: 'ot take to heart every thing you hear. do not take to heart every thing you hear. do not spend all; Whenever you find your wrongdoing',
  avatar: 'https://joeschmoe.io/api/v1/random',
  type: 'success'
})

// FoldMessage
FoldMessage({
  message: 'ot take to heart every thing you hear. do not take to heart every thing you hear. do not spend all; Whenever you find your wrongdoing',
  type: 'success'
})

// MessageBox
MessageBox({
  title: 'This is a title',
  content: 'ot take to heart every thing you hear. do not take to heart every thing you hear. do not spend all; Whenever you find your wrongdoing'
}).then(() => {
  // confirm
  console.log('confirm')
}).catch(() => {
  // cancel
  console.log('cancel')
})

// ProgressBox
ProgressBox({
  loadingTime: 3000
}).then(() => {
  // done
  console.log('done')
})

// Rate
Rate({
  title: 'like me~'
})

// Spinner loading
Spinner.show('loading...')
// ...javascript code
// loading finish
Spinner.done()

// add to cart
AddToCart({
  beforeTitle: 'adding...',
  afterTitle: 'finish'
})

API Docs

BubbleMessage

AttributeDescriptiontypeAccepted Valuesdefault
userusernameString--
messagemessage contentString-success
avataruser avatarString-https://joeschmoe.io/api/v1/random
typemessage typeStringsuccess/error-

FoldMessage

AttributeDescriptiontypeAccepted Valuesdefault
messagemessage contentString--
typemessage typeStringsuccess/error-

MessageBox

promise callback is supported
AttributeDescriptiontypeAccepted Valuesdefault
titletitleString--
contentmessage contentString--

ProgressBox

 promise callback is supported
AttributeDescriptiontypeAccepted Valuesdefault
loadingTimeloading timeNumber-5500(ms)

Rate

AttributeDescriptiontypeAccepted Valuesdefault
titletitleString--

Spinner

AttributeDescriptiontypeAccepted Valuesdefault
titleloading textString--
Spinner methods
AttributeDescription
showshow spinner loading
doneclose spinner loading

AddToCart

AttributeDescriptiontypeAccepted Valuesdefault
beforeTitletitleString--
afterTitlecomplete titleString--

License

js-dynamic-island is open source software licensed as MIT.

Keywords

js-dynamic-island

FAQs

Package last updated on 07 Dec 2022

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