# Interact.jl widget dimensions

**URL:** <https://discourse.julialang.org/t/interact-jl-widget-dimensions/26141>\
**Category:** New to Julia\
**Created:** [July 8, 2019, 2:32pm UTC](https://discourse.julialang.org/t/interact-jl-widget-dimensions/26141 "2019-07-08T14:32:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rand5](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rand5/32/867_2.png) [@rand5](https://discourse.julialang.org/u/rand5)\
**Post date:** [July 8, 2019, 2:32pm UTC](https://discourse.julialang.org/t/interact-jl-widget-dimensions/26141/1 "2019-07-08T14:32:19Z")

</div>

How would one specify the width and height of an interact button, dropdown menu, etc.? I didn’t see anything about this in the Interact docs.  
Thanks,

---

<div class="post-metadata">

**Author:** ![Jordan\_Cluts](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jordan_cluts/32/13753_2.png) [@Jordan\_Cluts](https://discourse.julialang.org/u/Jordan_Cluts)\
**Post date:** [July 9, 2019, 9:00pm UTC](https://discourse.julialang.org/t/interact-jl-widget-dimensions/26141/2 "2019-07-09T21:00:00Z")

</div>

I’ve been struggling to figure this out as well. The best I have figured out is that the Interact widgets are WebIO.jl nodes and so accept a style command like they do. See [here](https://juliagizmos.github.io/WebIO.jl/stable/gettingstarted/) for some documentation.

An example that seems to work for me is

```julia
button("Stop",style=Dict(
        :color => "white",
        :backgroundColor => "red",
        :width => "200px",
        :height => "100px",
        :fontSize => "3em"
   ))

```

which creates a big red STOP button.

---

<div class="post-metadata">

**Author:** ![rand5](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rand5/32/867_2.png) [@rand5](https://discourse.julialang.org/u/rand5)\
**Post date:** [July 9, 2019, 9:27pm UTC](https://discourse.julialang.org/t/interact-jl-widget-dimensions/26141/3 "2019-07-09T21:27:21Z")

</div>

Thanks @Jordan_Cluts , that is useful.  
How would one go about querying the size of a button though? If I use your example and do,

```julia
b = button("Stop",style=Dict(
        :color => "white",
        :backgroundColor => "red",
        :width => "200px",
        :height => "100px",
        :fontSize => "3em"
   ))

```

I would have thought that something along the lines of `get(b[:style],"height")` might work, but there is no field `style`.

---

<div class="post-metadata">

**Author:** ![Jordan\_Cluts](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jordan_cluts/32/13753_2.png) [@Jordan\_Cluts](https://discourse.julialang.org/u/Jordan_Cluts)\
**Post date:** [July 9, 2019, 10:06pm UTC](https://discourse.julialang.org/t/interact-jl-widget-dimensions/26141/4 "2019-07-09T22:06:38Z")

</div>

Unfortunately I don’t know, I’m trying to figure this all out as well. It seems to all boil down to WebIO.jl whose documentation leaves something to be desired.
