JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q48754F
  • License MIT

Package Exports

  • vue-acrylic
  • vue-acrylic/dist/index.cjs
  • vue-acrylic/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-acrylic) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Vue Acrylic

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

name type default Description
blur MaybeRef 30 ๆจก็ณŠๅคงๅฐ
color MaybeRef #e6e6e6 ้ขœ่‰ฒ/่‰ฒ่ฐƒ่ฆ†็›–ๅฑ‚
opacity MaybeRef 0.5 ่‰ฒ่ฐƒๅฑ‚ไธ้€ๆ˜Žๅบฆ
brightness MaybeRef 1 ๆŽงๅˆถๅฏไปŽ่ƒŒๆ™ฏ็ฉฟ่ฟ‡ Acrylic ๅ›พ้ข็š„ไบฎๅบฆ
saturate MaybeRef 1.6 ๆŽงๅˆถๅฏไปŽ่ƒŒๆ™ฏ็ฉฟ่ฟ‡ Acrylic ๅ›พ้ข็š„้ฅฑๅ’Œๅบฆ
noiseOpacity MaybeRef 0.75 ๅ™ช็‚นไธ้€ๆ˜Žๅบฆ
noiseSize MaybeRef 30 ๅ™ช็‚นๅคงๅฐ
disabled MaybeRef false ๆ˜ฏๅฆ็ฆ็”จ Acrylic
fallbackColor MaybeRef #e6e6e6e6 ๅœจ็ฆ็”จ็Šถๆ€ไธญๆ›ฟๆข Acrylic ็š„็บฏ่‰ฒ

๐ŸŒˆ Inspired by Fluent Design's Acrylic Material

โญ๏ธ 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