0.0.8 • Published 1 year ago

vue-acrylic v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

fork stars

screenshot screenshot

🌈 Demo

🚀 Requirements

  • Chorme 76+
  • Vue 3+

⚙️ Installation

npm i -S vue-acrylic

🦄 Use in JS

<h1 id="acrylic1">ACRYLIC</h1>
<h1 id="acrylic2">ACRYLIC</h1>

<script>
  import { useAcrylic } from 'vue-acrylic'

  const options1 = {
    bulr: 20,
    noiseOpacity: 1,
    noiseSize: 50
  }

  useAcrylic(document.getElementById('acrylic1'))
  useAcrylic(document.getElementById('acrylic2'), options1)
</script>

🦄 Use in Vue

import { createApp } from 'vue'
import Acrylic from 'vue-acrylic'
import App from './App.vue'

createApp(App).use(Acrylic).mount('#app')
<script setup>
  const opt = {
    bulr: 20,
    noiseOpacity: 1,
    noiseSize: 50
  }
</script>

<template>
  <div v-acrylic>Acrylic</div>
  <div v-acrylic="opt">Acrylic</div>
</template>

📄 Props

nametypedefaultDescription
blurMaybeRef30模糊大小
colorMaybeRef#e6e6e6颜色/色调覆盖层
opacityMaybeRef0.5色调层不透明度
brightnessMaybeRef1控制可从背景穿过 Acrylic 图面的亮度
saturateMaybeRef1.6控制可从背景穿过 Acrylic 图面的饱和度
noiseOpacityMaybeRef0.75噪点不透明度
noiseSizeMaybeRef30噪点大小
disabledMaybeReffalse是否禁用 Acrylic
fallbackColorMaybeRef#e6e6e6e6在禁用状态中替换 Acrylic 的纯色

🌈 Inspired by Fluent Design's Acrylic Material

npm.io

⭐️ Show Your Support

Please give a ⭐️ if this project helped you!

👏 Contributing

If you have any questions or requests or want to contribute, please write the issue or give me a Pull Request freely.

fork fork

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago