...

/

Set Up Reusable Components for the Project

Set Up Reusable Components for the Project

Learn how the reusable components for the survey project are designed and implemented on each page of the application.

Components are the building blocks of any modern web application, providing a modular and organized approach to development. Reusable components facilitate code and functionality sharing across various pages, expediting development and improving maintainability. The Vuetify library offers numerous reusable components with titles prefixed by v-. These components are thoroughly documented on their website.

The survey application components

While Vuetify components are readily available and fully functional, they need some adjustments and combinations to align with the specific use cases for the survey application.

In this lesson, we discuss and implement the components required to build a functional survey application in Nuxt using Vuetify predefined components and the fundamental Vue principles.

The TitleDescriptionComponent component

This component is used by the admin to set the survey title and description. It would also be used in displaying these contents to the survey takers.

Props

  • title: This is a string value to be displayed as the title of the survey form.
  • description: This is a string value to be displayed as the description of the survey form.
  • isAdmin: This is a boolean flag used to specify the mode for the form. If true, the title and description fields would be made to be editable.
...