Creating Custom Element from SFC that also imports the SFC's styles

This page summarizes the projects mentioned and recommended in the original post on /r/vuejs

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • vue-loader

    📦 Webpack loader for Vue.js components

    I am would like to have the added benefits of the encapsulated ShadowDOM on a Custom element, but would also like the versatility of keeping my SFCs as SFCs so that I can use them and any content placed in their slots as I normally would, without having to take the added encapsulation of the Shadow DOM into consideration if possible. Another developer had previously mentioned wanting an easy way to import styles from a SFC into a Custom element in this post, and Evan You replied that it is possible, but I was unable to find an example of it being done.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts