# A new look at modals in vue 3

This page summarizes the projects mentioned and recommended in the original post on dev.to

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.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • vue-modal

    🖖The progressive and simple modal system for Vue.js v3

  • from HTML. We will talk about modal windows in the vue ecosystem. Codes and the implementation can be viewed here jenesius-vue-modal. The new teleport feature in the third version of vue allows you to move content to the location you need. And that's cool! Maybe. having tried to use it on my project, my team encountered the following problems: how to support such code when any component can insert something anywhere in your product. We added abstractions, new components that were only used to limit the use of teleport. We used a lot of modal windows in our project. Open one, open another on top, return value from modal, integrate modal window in vue-router is not a complete list of what we implemented. At first we used a cool library, but like this the approach irritated our entire team: :user-id = "id" v-if = "isActive"/> Enter fullscreen mode Exit fullscreen mode For us, It looked awkward and we really wanted to get rid of it. We wanted to get rid of the description of the modal components windows in another component. Our task was to make modal windows to another level, another layer. In vue it is very convenient to use reactive states based on ref/reactive. Add a queue that will store open modal windows: const modalQueue = reactive([]); Enter fullscreen mode Exit fullscreen mode When adding a modal window, we will write the value there, when removing - delete. Everything seems to be very simple. Now to open a modal window add the openModal method: function openModal(component, props) { modalQueue.push({component, props}); } Enter fullscreen mode Exit fullscreen mode To close we use the splice method. Now all that remains is to display the modal windows. Let's create a separate one for this component in which the transferred components will be displayed. Also don't forget to pass props there: v-for = "item in modalQueue" :is = "item.component" v-bind = "item.props" /> Enter fullscreen mode Exit fullscreen mode To open a modal window from our new user card, let's add a click handler and call a new function: @click = "showUserModal">open template> const props = defineProps(['userId']) function showUserModal() { openModal(ModalUser, { userId: props.modalId }) } script> Enter fullscreen mode Exit fullscreen mode also, we must connect this component to App.vue. This is just a short but main part of what we have implemented. For us this approach allows you to build interfaces more accurately and safely. The entire code base can be found in the public repository at GitHub. We tried to give examples on how to use this library. We also described instructions and made nice documentation.

  • 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.

    SurveyJS logo
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

  • Playwright VS Code Extension, projects and global setup

    2 projects | dev.to | 21 May 2024
  • PocketBlocks alternatives - ToolJet, illa-builder, appsmith, Refine, and openblocks

    6 projects | 21 May 2024
  • Lix – A change control system for the web

    1 project | news.ycombinator.com | 21 May 2024
  • Lighthouse를 활용한 Tree Shaking

    1 project | dev.to | 21 May 2024
  • Install-Binary: GitHub Action to Install a Binary from a GitHub Release

    1 project | news.ycombinator.com | 21 May 2024