Welcome back!

In this second lesson we will look closer at building layouts using the visual nodes.

You already have a simple page but not much content. At the end of this lesson you will have built a card to display items in your task manager app.

 

Lesson tasks

Time to get your hands dirty!

During this lesson, you will be given multiple tasks. Spot them in the lesson timeline by the Task label.

If you get stuck you can get a hint by clicking the card in the timeline.

Some of the nodes graphs will already be set up for you beforehand. This is to keep the lessons short so that you can focus on learning one concept at a time. If it feels like magic at times, don't worry. It's just a concept you will learn in a later lesson.

 

Select page to preview

Select page to preview

At the top of the editor you have the Path Dropdown. It's similar to the URL-bar in a browser and is used to jump directly to a specific page of your app while you develop.

In this lesson we will be working on the page called Task Page. Let's jump to it.

Task

Select the /task-page path in the Path Dropdown

 

Select page to preview

Select page to preview

At the top of the editor you have the Path Dropdown. It's similar to the URL-bar in a browser and is used to jump directly to a specific page of your app while you develop.

In this lesson we will be working on the page called Task Page. Let's jump to it.

Task

Select the Task Page component in the Component Panel

 

The Group node

The Group node

The Group node is the most basic visual element and is used to structure layouts, group content, and create visual shapes.

If you are familiar with HTML code, a Group is similar to a <div>-tag in HTML.

 

Nested visual nodes

Nested visual nodes

You can nest visual elements as children of a Group node to start creating more advanced layouts.

This is a pattern you will see over and over again, so let's use it to build the card.

Task

Place a Group node as a child to the Content Container Group

Open the Node Picker by clicking the plus icon in the Topbar, or right click on an empty space in the Node Canvas.

You can find the Group node in the UI Elements category.

Task

Rename the Group to Card Item

Select the Group node and change its name by pressing the enter key. You can also double click the node title in the Property Panel, or click the edit icon as shown in the video.

Task

Set the background color of the new Group to the color style Primary Subtle

You open the Color Style list by clicking the text in the background color input.

 

Dimension mode:
Explicit width & content height

Dimension Mode: Explicit width & content height

By default Group nodes are set to a dimension mode with an explicit width and height of 100%. This means that they will take up all available space in both directions.

Often we want a Group's height to resize to the height of the children inside of it. We can achieve that with the dimension mode Explicit width & content height.

Task

On the Card Item Group, set the dimension mode to Explicit width & content height, and set all paddings to 24px

Task

On the Card Item Group, set the corner radius to 4px

Select the Group to bring up the Property Panel. Find the Corner Radius property and set it to 4px.

 

Images and media

Images and media

Noodl comes with different nodes for displaying images and video. They have a source property where you set the path to the file you want to show.

Clicking the Source input will show all available images and videos that are uploaded to the project. You can also input an external URL to a media file.

You can add images and videos to the project by simply dragging and dropping them into the editor. In this lesson we already added some images for you to use.

Task

Open the Node Picker and place an Image node as a child to the Card Item Group.

Open the Node Picker by clicking the plus icon in the Topbar, or right click on an empty space in the Node Canvas.

You can search for the Image node in the Node Picker's search field, or find it in the UI Elements category.

Task

Set the image source to work.png

Click the source property to see a list of available images in the project.

Task

Set the Image node's dimension mode to Explicit width and height

Click the Image node to open its Property Panel and scroll down to the dimension mode property. Hover over the different options to see what they are called.

Task

Set the image size to 80px width and 80px height

Click the Image node to open its Property Panel and scroll to the size property. Set the width and height to 80px.

Task

Place a new Group node as a sibling below the Image node

Open the Node Picker by clicking the plus icon in the Topbar, or right click on an empty space in the Node Canvas.

You can search for the Group node in the Node Picker's search field, or find it in the UI Elements category.

Task

Place three Text nodes as a children to the new Group

Open the Node Picker by clicking the plus icon in the Topbar, or right click on an empty space in the Node Canvas.

You can search for the Text node in the Node Picker's search field, or find it in the UI Elements category.

Use Ctrl/Cmd + C to copy a selected node, and Ctrl/Cmd + V to paste it.

Task

Rename the first Text node to Card Title

Select the first Text node and change its name by pressing the enter key. You can also double click the node title in the Property Panel, or click the edit icon.

Task

Rename the second Text node to Category, and the third Text node to Date

Select the second or third Text node and change its name by pressing the enter key. You can also double click the node title in the Property Panel, or click the edit icon.

 

Horizontal layouts

Horizontal layouts

By default all visual nodes are stacked vertically inside of their parent node.

We can change this by changing the parent's layout direction property to Horizontal instead of Vertical

Task

On the Card Item Group node, set the layout direction to Horizontal

Click the Group node named Card Item to open its Property Panel. Find the layout direction property and set it to Horizontal.

Task

Give the Image node a right margin of 24px

Click the Image node to open its Property Panel. At the top you will find the margin settings. Set the right margin to 24px.

 

Text and color styles

Text and color Styles

We can create styles for text and colors to quickly reference them and reuse them throughout our app. This can be done in every input property that deals with text or color.

Every Noodl project comes with a set of predefined styles, all of them can be modified.

Task

On the Card Title Text node, set the text style property to Title Medium

Outro

Congratulations!

Congratulations!

You've completed this lesson, we hope you liked it!

To take your Noodl skills to the next level we recommend our next lesson on how to create lists from data.

Keep on Noodling!