# Is there a way to create UI components?

**URL:** <https://forums.unrealengine.com/t/is-there-a-way-to-create-ui-components/1253576>\
**Category:** UI\
**Tags:** unreal-engine, component, UI, Blueprint, UMG\
**Created:** [August 7, 2023, 2:44pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-create-ui-components/1253576 "2023-08-07T14:44:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slydex44](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slydex44](https://forums.unrealengine.com/u/Slydex44)\
**Post date:** [August 7, 2023, 2:44pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-create-ui-components/1253576/1 "2023-08-07T14:44:16Z")

</div>

Probably the best analogy to describe what I mean is Material instances. So, after I created a material I can right click on it and create its instance, where I can change any values and textures.

I’m looking for something similar, for a method where I could create a Master widget with it’s own behaviour, like animations, and create instances of it which I could fill with different data from different sources.

As an example, I’m working on UI of 2 similar screens for my game, on one of them I choose a level to play and a vehicle on another. The idea is to reuse the same UI component (card).

 ![Screenshot 2023-08-07 at 17.07.55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/a/b/6abcaf1001c89ebff02606eb78ad507ffd67db4f.png)  
 ![Screenshot 2023-08-07 at 17.18.56](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/2/462b4acdbc4ce68eda5b6d04cb80a97f0a1d7617.png)

I created the Level card the way that on a Pre-construct event it’s variables are populated with data from data table, then, it’s children are added in a scroll box and their amount depends on the amount of rows in that data table.

I want to do the same with the vehicle cards as well, which will pull data from another data table **with different data structure** (forgot to mention that the image on the card is not the only data I fill it with, it has a lot more which renders outside the card in its parent widget, like Level name, time records, level to open etc., and for vehicles there should be stats like speed, handling…):

 ![Screenshot 2023-08-07 at 17.33.25](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/2/3027a6d7791dcdf67b675e5906a4c44796699486.png)

The simple way is to duplicate the level card and rewrite its pre-construct logic, but that doesn’t seem scalable at all, for instance, in the future I would like to change the card layout or its animations and I have to do it twice or even more times for each card 😕

I hope I described it well and will be grateful for any suggestions. Thank you!
