Responsiveness
LocoAI scans through your design files and applies styling & layout to your elements based on media queries so that these elements can adjust to different screen sizes.
What are Media Queries?
Media queries allow you to change the styling of your design based on rules such as screen width.
An example of that would be to change your design from being arranged horizontally to stacking vertically on the <428px Media Query - this means this setting is only applied when the screen width is less than 428px
By using Media Queries, you can control your design for various devices such as desktops, tablets, mobile and more.
Reviewing responsiveness & styling
After the Locofy.ai wizard has scanned & added styling properties, you can review and edit them.
-
Click on the "Review" button next to "Responsiveness"
-
From the list of layers, you can select the one that you need to the styling for.
-
Click on the edit button present on the right side to edit the styling properties.
Select and Edit in Preview
You can select the element you wish to edit directly from the preview.
- Click the 'Edit' tab on top of the preview window.
- You can now click the element in preview that you wish to edit. You can also hover over the element to see their name.
Once the item is selected, you can review & edit the decisions LocoAI made, present on the right panel, with regards to the selected element.
Editing responsiveness & styling
Working with media queries in Locofy.ai is easy:
- Click on the desired Media Query tab or select from the dropdown.
You can also select the state for which you want to apply the styling by clicking on the dropdown next to State. For example you can change the background color for the hover state.
-
Edit the styling of the layer in the styling sections below. All the changes made will apply to the selected media query.
-
Preview to see how your element behaves in your selected screen size
Creating beautiful interactions with states
Elements on your page are not just static. As users interact with the elements, you may want have a different styling for your element based on its state.
You can do so inside Figma with the Locofy plugin. Commonly used states which are supported by Locofy are:
- Normal
- Hover
- Pressed
- Disabled
- Focused
- Checked
- Empty
Editing element style in its different states
To edit the styling for an element in different states such as hover and disabled:
- Select the state you want to edit for. You can click ont the dropdown next to State.
-
Edit the styling of your layer. All changes made will apply only to the selected state.
-
Preview to see how your layer looks in the newly styled state by clicking "Done".
Edit styling properties for your layers
Locofy supports styling options for:
- Prebuilt Effects
- Display, Size & Position
- Spacing
- Fill
- Border
- Shadow
- Typography
- Cursor
- Layout
Advanced CSS properties
Advanced users can use any CSS property they need by entering key-value pairs in this section.