1.0.3 • Published 5 months ago

web-component-amazing-border v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

Web Component Amazing Border

NPM License

Lightweight draw border container < 5k 😎 Compatible with React, Vue, Angular & other frameworks. Add your content with a slot element. Customizable Border color.

amazing-border

Vue usage

npm i web-component-amazing-border

main.js

import AmazingBorder from "web-component-amazing-border";

customElements.define('amazing-border', AmazingBorder);

App.vue

onMounted(() => {
  let amazingContainerElement = document.querySelector('#amazing-container');
  amazingContainerElement.options = {
    borderColor: 'rgba(148,136,110,0.47)',
  }
});

<template>
<amazing-border id="amazing-container">
  <div slot="content">
    Lapsus Calami
  </div>
</amazing-border>
</template

vite config:

export default defineConfig({
  plugins: [
    vue({
      template: {
        compilerOptions: {
          isCustomElement: (tag) => tag.includes( 'amazing-border')
        }
      }
    })
  ],

Contact

hi@giladshohat.com 💫