# "Focus" Element of Flex Layout - Styles, Animations, Transform - Styles?

**URL:** <http://forum.squareline.io/t/focus-element-of-flex-layout-styles-animations-transform-styles/6207>\
**Category:** How to\
**Created:** [November 8, 2025, 12:19am UTC](http://forum.squareline.io/t/focus-element-of-flex-layout-styles-animations-transform-styles/6207 "2025-11-08T00:19:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kjn260](http://forum.squareline.io/letter_avatar_proxy/v4/letter/k/3bc359/32.png) [@kjn260](http://forum.squareline.io/u/kjn260)\
**Post date:** [November 8, 2025, 12:19am UTC](http://forum.squareline.io/t/focus-element-of-flex-layout-styles-animations-transform-styles/6207/1 "2025-11-08T00:19:40Z")

</div>

### What do you want to achieve?

I am trying to make a gear indicator “carousel” for a cluster display.

The selected “gear” is in the centre and as the gear changes, the element will scroll into the centre focus, the other elements/gears “fade away”

I want to know in a flex layout if there is possible to determine the focus/snapped item?

and if there is therefore some index that can be used to set display state/animate the elements to the left right to either transform, add opacity, change style as you scroll.

### What have you tried so far?

I created a scrollable panel, with a text element for each indicated gear.  
It scrolls manually ok in play mode - i cannot determine if its possible to specify the “focus” element in the scrolling panel like this, and if its possible to have the “unfocused” elements adopt a different state.

I believe I could use user states to set the difference (opacity, padding etc) - although I cannot figure out how to get transform working and remain centered in the element (transforms to upper left corner - no alignment options available?

### Screenshot or video

 ![Screenshot 2025-11-08 095235](http://forum.squareline.io/uploads/default/original/2X/3/35f2b0c2122844bef509bbb305676e38192751fd.png)

You can see my desired outcome here in the centre, with manually set padding and blend variables:  
Default = element 64x64  
User 1 = Normal Text, Width increase 100  
User 2 = Blend opacity 100  
User 3 = Blend opacity 20  
User 4 = Blend opacity 0

Ideally some where for the panel element there is an index against each visible item which I can set state, when I scroll, there is a some transition between states. I would think this is possible, but I am not sure.

Below this is just a reference concept image from my artwork (photoshop).

### Others

- **SquareLine Studio version: 1.5.4 LVGL 9.2.x**
- **Operating system: Windows Editor**
- **Target hardware: Embedded Linux**

---

<div class="post-metadata">

**Author:** ![SquareLine\_Support](http://forum.squareline.io/user_avatar/forum.squareline.io/squareline_support/32/47_2.png) [@SquareLine\_Support](http://forum.squareline.io/u/SquareLine_Support)\
**Post date:** [November 11, 2025, 10:52am UTC](http://forum.squareline.io/t/focus-element-of-flex-layout-styles-animations-transform-styles/6207/2 "2025-11-11T10:52:58Z")

</div>

Hi, this can be solved in several ways. Perhaps the simplest and most spectacular solution is to create an animation.

To demonstrate how this could be implemented, I have put together a demo project for you. Please find it attached.

We hope this helps.

  
[animation.zip](http://forum.squareline.io/uploads/short-url/xhGeNHHUfuH8fnWEaRZttmA2MTd.zip) (104.8 KB)
