Anchor component in coordinate container

Hi
I need to anchor some component to button right corner of view so if user extend the browser it always anchor at right button corner like app bar icon.
How can I do that in perspective?

There are several ways to do this, but it all depends on the layout of your View.

One easy way:

  1. Construct your View with a Flex Container (props.direction set to column).
  2. Place what you would like as your ‚Äúprimary‚ÄĚ container type first (in the attached View I used a Column Container); we will call this the ‚ÄúPrimary‚ÄĚ container for this example.
  3. Now Place a second Flex Container, and set this Flex Container‚Äôs props.direction to ‚Äúcolumn-reverse‚ÄĚ.
  4. Set the position.basis for this Flex Container to whatever height you want your Button to have.
  5. Deep-select this child Flex Container and place a third Flex Container, and set this Flex Container‚Äôs props.direction to ‚Äúrow-reverse‚ÄĚ.
  6. Deep-select the third Flex Container we just placed and place a button into it.
  7. Now go all the way back to the ‚ÄúPrimary‚ÄĚ container you placed into your root container, and set position.grow to 1.

Your structure should look like this:
59%20AM

Here’s the View I constructed:
view.json (1.6 KB)

3 Likes