Reusable Component Libraries

1. When You Will Need Libraries

  • Library components can be used for designing your "SliderDrawer" and "ListViewItem"s.

  • When you have a set of components that you want to use across your pages, just create a library component, and reuse it.

2. How To Use Libraries

  • From the Project Explorer, open the Library pane.

  • Drag a FlexLayout from the toolbox to the Library. This layout represents your first library component.

  • Double click on the FlexLayout that you just moved. This will enable you to insert other components inside your layout.

  • Drag a Button inside your layout, then save your changes.

  • There you have it! You can use this library component across all of your pages.

  • Now drag "flexlayout1" (which is your library component), from the library pane to your page.

  • Don't forget that a library component update will be reflected to all pages using this component. This is the primary advantage of using a library.

  • As an example, change the background color of your button of "flexlayout1"

3. Remarks

Nested Libraries

You can also use library components inside other library components to maximize reusability.

Using a FlexLayout for a Library

We encourage you to create your library components inside a "FlexLayout" so that when you change its child components in the library, all pages using this library will receive the update.