KuangPF / ribbons

๐ŸŒˆ Add a flowing, smart ribbon to the background.

Home Page:https://kuangpf.com/ribbons/example/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ribbons

๐ŸŒˆ Add a flowing, smart ribbon to the background. demo

Build Status codecov PRs Welcome

English | ็ฎ€ไฝ“ไธญๆ–‡

๐Ÿ“ฆ Install

CDN

<script src="https://cdn.jsdelivr.net/npm/better-ribbons/dist/ribbons.min.js"></script>

If you are using native ES Modules, there is also an ES Modules compatible build:

<script type="module">
  import Ribbons from 'https://cdn.jsdelivr.net/npm/better-ribbons/dist/ribbons.esm.js'
</script>

npm

npm i better-ribbons -S

๐Ÿ”จ Usage

Initialize a Ribbons instance

import Ribbons from 'better-ribbons'

const ribbonsInstacne = new Ribbons()
/* custom option */
const ribbonsOption = new Ribbons(
  {
    size: 100,
    alpha: 0.7
    zIndex: 0.5
  }
)

๐Ÿบ Options

  • size

    • Description: The size of each ribbon
    • Default: 90
    • Type: number
  • alpha

    • Description: ribbon transparency
    • Default: 0.6
    • Type: number
  • zIndex

    • Description: ribbon 'z-index` attribute
    • Default: -1
    • Type: number

โ˜•๏ธ Screenshot

img

LICENSE

MIT ยฉ KuangPF

About

๐ŸŒˆ Add a flowing, smart ribbon to the background.

https://kuangpf.com/ribbons/example/index.html

License:MIT License


Languages

Language:TypeScript 46.3%Language:JavaScript 39.1%Language:HTML 9.3%Language:Shell 5.3%