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

@9am/flipr

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@9am/flipr

A flipping book library.

latest
Source
npmnpm
Version
1.1.2
Version published
Maintainers
1
Created
Source
flipr

@9am/flipr

A flipping book library. 📖

GitHub npm npm npm bundle size

Demo

flipr-ss

Edit random-image

Features

  • Create a flipping book from html content.
  • Support horizontal or vertial layout.

Usage

Install

npm install @9am/flipr

HTML

<ol id="content">
    <li>1111111111</li>
    <li>2222222222</li>
    <li>3333333333</li>
    <li>4444444444</li>
</ol>

Javascript

import Flipr from '@9am/flipr';
import '@9am/flipr/style.css';

const flipr = new Flipr({
    /* FliprOptions */
    w: 600,
    h: 400,
    content: document.querySelector('#content'),
    tHint: 'tr',
});

// append dom
document.body.appendChild(flipr.dom);

Documentation

FliprOptions

NameTypeDefaultDescription
wnumberrequired*book width
hnumberrequired*book height
contentHTMLElementrequired*the content element whose children will be used to render book
phnumber0book padding horizontal
pvnumber0book padding vertical
align'horizontal' | 'vertical''horizontal'book layout
pageNumnumber0default page num
tSizenumber100trigger area size
tHint'tl' | 'tr' | 'bl' | 'br' | ''''show hint trigger area before user interaction
tHintIntervalnumber1000hint animation interval in ms

CSS Properties

NameTypeDefaultDescription
--flipr-paddingcss <padding>20pxpage padding
--flipr-bgcss <background>whitepage background

License

MIT

Keywords

flip

FAQs

Package last updated on 12 Apr 2023

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