FlutterFlow Docs
Search…
Widgets/UI Elements
Widgets are essential in creating the user interface of your app. On this page, you will learn what is widgets, what are its types, how to work with them, and how to use widget options.

What is Widget

In FlutterFlow, The widget is the UI element that helps you build the layout of your page. Almost everything that you see on the page is a widget. You build the UI by combining the widgets in parent-child relationships.
​Text, Row, Column, Stack, and Container are the most basic types of widgets. Learn more about how to use them here.
Page layout built using widgets

Widget tree

When you combine multiple widgets or nest them into another widget, they form something called a widget tree. You can access the widget tree from the navigation menu (left side of your screen). It gives you a better idea of how many widgets are added to a page and how they are added (knowing the parent or child of any widget).
Widget tree

Types of widgets

There are three main types of widgets you can add to your page.
  1. 1.
    ​Standard widget​
  2. 2.
    ​Custom widget​
  3. 3.
    ​Template widget​

1. Standard widget

Standard widgets are the building blocks in creating the UI of your page. Every standard widget serves a purpose. Some widgets are only used to create the layout and are not visible on the screen. In contrast, some widgets are visible and are used to display something on the screen, accept input from users, or allow users to take action.
Standard widgets are accessible from the Widgets tab inside the UI Builder.
Based on their responsibility and usage, they are sorted into five following categories:
  1. 2.
    ​Layout Elements​
  2. 3.
    ​Base Elements​
  3. 4.
    ​Page Elements​
  4. 5.
    ​Form Elements​
Standard widgets

2. Custom widget

Custom widgets include the widgets that you created out of the standard widgets (called components) and the custom code widgets that you added from the pub.dev. A custom widget can be a fully featured widget and is ready to be used anywhere inside your app.
Custom widgets

3. Template widget

Templates widgets are predefined and ready-to-use widgets. This includes the UI elements that are very common in most apps and can serve as the starting point in creating the part of the user interface. You can also create your own template from the standard widget.
  • Standard widgets are accessible from the Templates tab inside the UI Builder.
  • Template widgets are shared across all the FlutterFlow projects.
Template widgets

Working with widgets

In this section, you will learn how to add & remove widgets and what you can do with them. Also, how to move, reorder, and rename the widgets.

Adding widget

You can build the UI by adding different widgets to the canvas. You can add the widgets in two ways:
  1. 1.
  2. 2.

1. From the widget tree

The widget tree shows a list of all the widgets added to a page. But that's not all. You can also add the new widgets (as a child widget) directly from the widget tree.
To add the widget from the widget tree:
  • Select the Widget Tree from the Navigation Menu (left side of your screen).
  • Select the widget under which you would like to add a new widget and click on the add widget icon (
    ).
  • Search or select the desired widget from the popup. This will add a new widget to the widget tree and will appear on the canvas.
Adding widget from the widget tree

2. From the widget panel

To add widgets from the widget panel:
  • Select the UI Builder from the Navigation Menu (left side of your screen).
  • Search or select the widget from the list, and then drag and drop it at a suitable place into the canvas area.
If you see a popup while dropping the widget, you can select the widget under which you would like to add a new widget.
Adding widget from the widget panel

Renaming widget

When you add widgets, they are given the widget name by default. For example, if you add a Text widget, its name would be Text. For the TextField widget, it would be TextField, and so on. If you have multiple such widgets, it may create confusion in selecting the correct widget, especially while connecting them with the data. Hence it's always a good idea to rename widgets to easily recognizable names.
To rename a widget:
  • Select a widget from the widget tree or the canvas area.
  • Move to the properties panel on the right side of your screen.
  • Find the existing widget name and click on the edit icon (
    ).
  • Enter the new name and click on the done icon (
    ).
Renaming widgets

Changing widget properties

You can change the appearance and behavior of the widget by modifying its properties from the properties panel. This includes customizing widget, adding actions, adding backend queries, generating dynamic children, and adding animations. These properties vary based on the widget you have added.

Moving widgets

While building the UI, you might want to move a widget up and down, take it outside of its parent widget, and make it a child of another. You can move the widgets inside the widget tree and the canvas area.
To move the widget, select the widget from the widget tree or the canvas area, drag it upwards or downwards and drop it at the desired location.
Moving widgets-1
The color of the bar indicates how the widget will be added.
  • If you see an orange line, the target widget can accept the child widget. If you drop it there, the current widget will be placed as a child of the target widget.
  • If you hold on for a couple of seconds, you'll see a purple line that means the current widget will be placed below/next to the target widget.
Moving widgets-2

Collapse/Expand widgets

You might add many widgets to your page, which may overwhelm you. To overcome this, you can always collapse or expand the widgets in the widget tree. You can use this feature to stay focused on building the specific part of the UI.
To collapse or expand the specific widget, use the arrow icon (right side of the widget name). To collapse or expand all the widgets together, use the collapse/expand view icon at the top right side of the widget tree.
Collapse/Expand widgets

View widget hierarchy

Sometimes you might want to see the widget hierarchy that shows all the parent widgets till the top most widget in the widget tree. Viewing the widget hierarchy gives you an idea of how the UI is structured.
To view the widget hierarchy, select the widget from the canvas area and click on the green-colored box showing the widget name. You can also select a particular widget by clicking on its name.
View widget hierarchy

Removing widget

To remove the widget, select the widget from the widget tree or the canvas area and press the Backspace or Delete key on the keyboard.
Removing widget

Widget options

In this section, you will learn how to copy-paste, duplicate, wrap, replace widgets, and more.

Cut/Copy/Paste widget

You can cut, copy and paste the widgets to speed up building the UI. To do so, select the widget from the widget tree or canvas area, right-click, and select the cut, copy or paste option.
Cut, Copy, Paste widget

Duplicate widget

To create a replica of any widget, you can use the duplicate widget option instead of copy-pasting the entire widget. The new widget (replica of the existing widget) will be created below/next existing widget.
To duplicate a widget, select the widget from the widget tree or the canvas area, right-click, and select the Duplicate option.
Duplicating widget

Wrap widget

Using the wrap widget option you can add the parent widget to the current widget. This is the opposite of adding a widget (where you add child widgets). This is useful when you want to add the widgets in between at a later stageβ€”for example, wrapping the TextField widgets inside the Form widget after building the UI.
To wrap a widget:
  • Select the widget from the widget tree or the canvas area.
  • Right-click, and select the Wrap Widget option. This will open a popup.
  • Select the widget under which you would like to wrap the current widget.
Wrap widget

Replace widget

When you have a list of items in a scrollable view (e.g., Column, Row, ListView) and want to replace it with another scrollable view, you can use the replace widget option. The widgets you can replace are Column, Row, Wrap, ListView, GridView, and StaggeredView.
Applying this option may cause an error depending on the layout of your page.
To replace a widget:
  • Select the widget from the widget tree or the canvas area.
  • Right-click, and select the Replace Widget option. This will open a popup.
  • Select the widget you would like to replace with.
Replace widget

Copy widget code

You can use this option to copy any part of your UI (built in FlutterFlow) and try it out on your local IDE or any other online code editor.
To copy the widget code:
  • Select the widget from the widget tree or the canvas area.
  • Right-click and select the Copy Widget Code option.
  • Open your IDE or online editor and paste the code at the desired location.
Copy widget code

Save as template

We offer you a wide variety of ready-to-use widgets as a template, but you can also create your own by saving the widget as a template.
To save to the widget as a template:
  • Select the widget from the widget tree or the canvas area.
  • Right-click and select the Save as Template option. This will open a popup.
  • Enter the Template Name and click on the Save Template.
  • To see the newly created template, select the UI Builder from the navigation menu and select the Templates tab. Your template will appear inside the My templates section.
Saving widget as a template

Convert to component

Components are the reusable elements that you can create out of any widget in your project.
To convert the widget into a component:
  • Select the widget from the widget tree or the canvas area.
  • Right-click and select the Convert to Component option. This will open a popup.
  • Enter the component name and click on the + Add Component.
  • To see the newly created component, select the UI Builder from the navigation menu and select the Components tab. Your component will appear inside the Custom Components section.
Convert widget to component