1.0.8 • Published 2 years ago

@floating-ball/core v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@floating-ball/core

floating ball core

Install

// npm
npm i --save @floating-ball/core
// yarn
yarn add -D @floating-ball/core
// pnpm
pnpm add -D @floating-ball/core

Usage

// cjs
const floatingBallCore = require('@floating-ball/core');

// esm
import floatingBallCore from '@floating-ball/core';

// pass theme, position and column as initvalue
const fbCore = new floatingBallCore('#595857', 'top right', 2, true)

// or nothing
const fbCore = new floatingBallCore()

DOCS

args

ArgsroleDescriptionTypedefault
firstthemeset floating ball primary colorString#202a31
secondpositionset floating ball init position.(top/bottom/left/right)Stringbottom right
thirdcolumnset floating ball column of popover.(max: 4)Number2
fourthcanMovecontrol the floating ball can move by mouseBooleantrue