# Perspective Component Get Current Size?

**URL:** <https://forum.inductiveautomation.com/t/perspective-component-get-current-size/90643>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [May 20, 2024, 9:33pm UTC](https://forum.inductiveautomation.com/t/perspective-component-get-current-size/90643 "2024-05-20T21:33:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob\_Kelley](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@Jacob\_Kelley](https://forum.inductiveautomation.com/u/Jacob_Kelley)\
**Post date:** [May 20, 2024, 9:33pm UTC](https://forum.inductiveautomation.com/t/perspective-component-get-current-size/90643/1 "2024-05-20T21:33:33Z")

</div>

I am trying to use a percent mode coordinate container, which will be placed inside a flex container. There are some components inside the coordinate container that I would like to dynamically readjust some properties based on the current size of that component. I can't seem to find any properties for this. The only ones are the components width and height, which are 0-1 for the percent root container, or the views default size, which is in pixels but won't change based on the flex container it is in like I want.

Is there a way to get the current displayed size (in pixels) of the component, the coordinate container, or the size of the flex container it's in?

What I am trying to do is adjust the border radius of a label so it always looks like its fully rounded on its ends.

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [May 20, 2024, 9:50pm UTC](https://forum.inductiveautomation.com/t/perspective-component-get-current-size/90643/2 "2024-05-20T21:50:38Z")

</div>

I have used CSS container size queries for that kind of thing:

> **[container-type - CSS: Cascading Style Sheets | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/container-type)**
>
> An element can be established as a query container for container size queries using the container-type CSS property. container-type is used to define the type of size containment used in a container query.

I don't think there's a way to directly get the size of the container with a script, but you can use CSS to define different values for different size ranges of container components.
