Partial? or Component? - Dynamic Selection

The purpose of Partials is to allow developers to break down and reuse pieces of HTML code across different templates, which helps in keeping the code DRY (Don't Repeat Yourself).

A Web Component is a suite of standardized APIs that allows developers to create custom, reusable HTML elements with encapsulated functionality and styling. The primary purpose of Web Components is to enhance web development by providing a more modular, reusable, and maintainable approach to building user interfaces.

To summarize, for your application you will need a Web Component.

  1. In Wappler, you can create a Custom Extension as outlined in the following documentation:
    Wappler Extensibility - Build Custom Wappler Extensions

  2. The other method is to create a Custom Element as outlined:
    Using custom elements - Web APIs | MDN