automatically adjust the component to these changes.<\/strong><\/p>\n
<\/p>\n
<\/p>\n
Another advantage is having components that adapt to different dimensions, making it much easier to scale your design to other devices. See that the layout doesn’t break when other sizes are applied; instead, it adapts to the new conditions.<\/p>\n
<\/p>\n
<\/p>\n
On top of all this, you still guarantee the consistency of margins, spacing, and alignment, among other properties.<\/p>\n
This ensures flexibility and scalability without compromising the quality of your designs<\/strong>, especially when collaborating with a team.<\/p>\nThat sounds awesome, right? So now that we know some of the benefits of using Auto Layout, let’s move on to the tutorial on creating a Task Card.<\/p>\n
<\/p>\n
Step #1: Tag + Priority<\/strong><\/h2>\n
<\/p>\n
<\/h3>\nTag<\/strong><\/h3>\nTo get started, we will design a\u00a0Tag<\/strong>. Start by writing the text for the Tag, then select it and add Auto Layout (Shift + A). This will create an Auto Layout frame that contains your text.<\/p>\nNow it’s time to edit the properties:<\/p>\n
\n- Make sure that the\u00a0Width<\/strong>\u00a0and\u00a0Height<\/strong>\u00a0of the frame are set to\u00a0Hug Contents.<\/strong><\/li>\n
- Then, set the\u00a0Horizontal<\/strong>\u00a0and\u00a0Vertical<\/strong>\u00a0Paddings<\/strong>.<\/li>\n
- Apply colours, font styles and corner radius to style<\/strong> your Tag as you like.<\/li>\n<\/ol>\n
<\/p>\n
<\/p>\n
<\/p>\n
Here are the settings I’ve applied to my Tag component:<\/p>\n
<\/p>\n
<\/p>\n
Priority<\/strong><\/h3>\nNow let’s move on to the task\u00a0Priority<\/strong>. In this component, we will need an icon and text. Put them together and apply Auto Layout. Once again, a frame will be created with the elements you just made.<\/p>\nThen, adjust the Auto Layout properties for the Priority component:<\/p>\n
\n- The\u00a0Direction<\/strong>\u00a0should be\u00a0Horizontal<\/strong>.<\/li>\n
- The\u00a0Width<\/strong>\u00a0and\u00a0Height<\/strong>\u00a0should be set as\u00a0Hug<\/strong>\u00a0Contents<\/strong>.<\/li>\n
- Set\u00a0Paddings<\/strong>\u00a0to\u00a0zero<\/strong>.<\/li>\n
- And set the desired\u00a0Spacing<\/strong>.<\/li>\n<\/ol>\n
<\/p>\n
<\/p>\n
<\/p>\n
Here are the settings I’ve applied to my Priority component:<\/p>\n
<\/p>\n
<\/h3>\nCombine the two<\/strong><\/h3>\nWith the Tag and Priority ready, let’s combine the two components in the same frame. Select both, add Auto Layout, and adjust the properties of the new frame:<\/p>\n
\n- The\u00a0Direction<\/strong>\u00a0should be\u00a0Horizontal<\/strong>.<\/li>\n
- The\u00a0Height<\/strong>\u00a0should be set as\u00a0Hug Contents<\/strong>.<\/li>\n
- Set the\u00a0Spacing<\/strong>\u00a0Mode<\/strong>\u00a0to\u00a0Space<\/strong>\u00a0Between<\/strong>. You can do this by typing “Auto” in the Spacing input on the right sidebar, or turning this setting on manually in the Advanced Layout menu.<\/li>\n
- For now, the Width<\/strong> will be set to Fixed<\/strong>. We’ll go back to this property later on.<\/li>\n<\/ol>\n
<\/p>\n
<\/p>\n
<\/p>\n
And that’s it! Let’s move on to the second part of this tutorial and create the Title and the Description.<\/p>\n
<\/p>\n
<\/p>\n
Step #2: Title + Description<\/strong><\/h2>\n
<\/p>\n
<\/p>\n
The second part consists of the\u00a0Title<\/strong>\u00a0and the\u00a0Description<\/strong>\u00a0of the task. First, create the texts for your Title and Description. Then, select both and apply Auto Layout.<\/p>\nFor this part, the settings are:<\/p>\n
\n- The\u00a0Direction<\/strong>\u00a0is\u00a0Vertical<\/strong>.<\/li>\n
- Set the\u00a0Spacing<\/strong>\u00a0you want.<\/li>\n
- The Alignment<\/strong> should be Top Left.<\/strong><\/li>\n
- For both texts, set the\u00a0Width<\/strong>\u00a0to\u00a0Fill Container<\/strong>\u00a0so the text fills the entire frame width.<\/li>\n
- And for the\u00a0Height<\/strong>, set as\u00a0Hug<\/strong>\u00a0Contents<\/strong>\u00a0for both texts. This way, the Height will be dynamic and adjusted to the content.<\/li>\n<\/ol>\n
<\/p>\n
<\/p>\n
<\/p>\n
Here are the settings I’ve applied to my Title and Description frame:<\/p>\n
<\/p>\n
The second part is ready! Time to make the last piece of the Card: Assignees and Sub-tasks Counter.<\/p>\n
<\/p>\n
<\/p>\n
Step #3: Assignees + Sub-tasks Counter<\/strong><\/h2>\n
<\/p>\n
<\/h3>\nAssignees<\/strong><\/h3>\nFor the Assignees, take two avatar images and put them together by adding Auto Layout. Set the properties as follows:<\/p>\n
\n- Direction<\/strong>\u00a0as\u00a0Horizontal<\/strong>.<\/li>\n
- All\u00a0Paddings<\/strong>\u00a0as\u00a0zero<\/strong>.<\/li>\n
- Width<\/strong>\u00a0and\u00a0Height<\/strong>\u00a0as\u00a0Hug<\/strong>\u00a0Contents<\/strong>.<\/li>\n
- And the\u00a0Spacing<\/strong>\u00a0with some\u00a0negative<\/strong>\u00a0value<\/strong>, so it has an overlapping effect.<\/li>\n<\/ol>\n
<\/p>\n
<\/p>\n
Here are the settings I’ve applied to my Assignees component:<\/p>\n
<\/p>\n
<\/h3>\nSub-tasks Counter<\/strong><\/h3>\nThis component will be very similar to Priority. We will need an icon and some text. Put the two together and apply Auto Layout. The properties on the Sub-tasks Counter are set like this:<\/p>\n
\n- The\u00a0Direction<\/strong>\u00a0must be\u00a0Horizontal<\/strong>.<\/li>\n
- Width<\/strong>\u00a0and\u00a0Height<\/strong>\u00a0should be\u00a0Hug<\/strong>\u00a0Contents<\/strong>.<\/li>\n
- Set the\u00a0Paddings<\/strong>\u00a0to\u00a0zero<\/strong>.<\/li>\n
- Set the desired\u00a0Spacing<\/strong>.<\/li>\n<\/ol>\n
<\/p>\n
<\/p>\n
Here are the settings I’ve applied to my Sub-tasks Counter component:<\/p>\n
<\/p>\n
<\/p>\n
Combine the two<\/strong><\/h3>\nNow, let’s combine the two components into a single frame. Select both, add the Auto Layout, and adjust the properties of the new frame:<\/p>\n
\n- The\u00a0Direction<\/strong>\u00a0should be\u00a0Horizontal<\/strong>.<\/li>\n
- The\u00a0Height<\/strong>\u00a0should be\u00a0Hug<\/strong>\u00a0Contents<\/strong>.<\/li>\n
- Set the\u00a0Spacing<\/strong>\u00a0Mode<\/strong>\u00a0to\u00a0Space<\/strong>\u00a0Between<\/strong>.<\/li>\n
- For now, the\u00a0Width<\/strong>\u00a0will be set to\u00a0Fixed<\/strong>. We’ll go back to this property in the next step.<\/li>\n<\/ol>\n
<\/p>\n
<\/p>\n
<\/p>\n
And with that, you’ve finished building all the components you need to design your task card!<\/p>\n
<\/p>\n
Step #4: The Task Card<\/strong><\/h2>\n
<\/p>\n
<\/p>\n
Yay! You’ve made it to the final step. Now, let’s assemble everything you designed throughout the tutorial and create the Task Card.<\/p>\n
First, select the three frames you created in the previous steps, then add Auto Layout one last time.<\/p>\n
This will nest all the elements into a single frame, forming the Task Card. To set the final adjustments on your component, use the following properties:<\/p>\n
\n- The\u00a0Direction<\/strong>\u00a0should be\u00a0Vertical<\/strong>.<\/li>\n
- The\u00a0Height<\/strong>\u00a0should be\u00a0Hug<\/strong>\u00a0Contents<\/strong> so that it can be dynamically adjusted to its content.<\/li>\n
- The\u00a0Width<\/strong>\u00a0can be set as\u00a0Fixed,<\/strong> and you should\u00a0input the desired Width.<\/li>\n
- Make sure the Alignment<\/strong> is set as Top Left.<\/strong><\/li>\n
- Set the\u00a0Spacing<\/strong>\u00a0to whatever you want.<\/li>\n
- Set the desired\u00a0Paddings<\/strong>.<\/li>\n
- Select all\u00a0child frames<\/strong>\u00a0and change their\u00a0Width<\/strong>\u00a0to\u00a0Fill Container<\/strong>\u00a0so that they fill the entire card width.<\/li>\n
- Finally, add a background, round the corners, and\u00a0voil\u00e1<\/em>\u00a0– the Task Card is ready!<\/li>\n<\/ol>\n
<\/p>\n
<\/p>\n
Here are the settings I’ve applied to my Task Card component:<\/p>\n
<\/p>\n
<\/p>\n