Giter Site home page Giter Site logo

elmassimo / vue-custom-element-example Goto Github PK

View Code? Open in Web Editor NEW
58.0 4.0 12.0 163 KB

An example on how to define custom elements using Vue 3

Home Page: https://maximomussini.com/posts/vue-custom-elements/

License: MIT License

Vue 25.93% TypeScript 33.48% HTML 30.61% CSS 9.99%
vue vuejs3 custom-elements demo tutorial web-components web-components-library

vue-custom-element-example's Introduction

vue-custom-element-example's People

Contributors

elmassimo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vue-custom-element-example's Issues

Including vue-router and pinia

Hey @ElMassimo, thanks for this invaluable repo, I was able to build and ship a complex Web Component with Chart.JS and Tailwind, pretty cool and I enjoyed a lot, your repo was very helpful.

I want to go step ahead with this approach and I wanna know if you have thought about how to include vue-router and pinia libraries, so we might using them without any issue. I'm trying implement this approach but I have been finding some caveats. I will be thankfully if you help me putting this in the right direction with this.

Regards!

Unclear on using in an external site

Hey @ElMassimo,

Can I use your dark mode switch on my site? How would I do that? I tried this:

<script type="module" src="https://raw.githubusercontent.com/ElMassimo/vue-custom-element-example/main/package/src/index.ts"></script>

But it did not work.

Basically, I'm trying to build a "widget" that someone can embed on their site (like your dark mode switch), but am unclear how you would embed a Vue custom element on an external site. So, how would I embed your dark mode switch on my site? Is that possible?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.