When creating a widget, define its form, fields, and its behaviour by using the template elements to specify the way it displays with HTML and Widget Attributes. The widget template also allows end-users to input data and interact with it. Apply HTML tags and React components to add and control elements such as buttons and various types of fields.