# Do Notebooks have a default width variable? Does it set automatically?

**URL:** <https://talk.observablehq.com/t/do-notebooks-have-a-default-width-variable-does-it-set-automatically/7188>\
**Category:** Help\
**Created:** [October 24, 2022, 3:24pm UTC](https://talk.observablehq.com/t/do-notebooks-have-a-default-width-variable-does-it-set-automatically/7188 "2022-10-24T15:24:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oliver](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/oliver/32/6546_2.png) [@Oliver](https://talk.observablehq.com/u/Oliver)\
**Post date:** [October 24, 2022, 3:24pm UTC](https://talk.observablehq.com/t/do-notebooks-have-a-default-width-variable-does-it-set-automatically/7188/1 "2022-10-24T15:24:04Z")

</div>

Or am I missing the width somewhere in this notebook?

> **[Bar Chart with negative values](https://observablehq.com/@toff/bar-chart-with-negative-values)**
>
> This chart shows the relative frequency of letters in the English language with random frequencies inverted from positive to negative. This is a vertical bar chart, also known as a column chart. Compare to a horizontal bar chart.

If it sets automatically, what is the ratio?  
Many thanks!

---

<div class="post-metadata">

**Author:** ![yurivish](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/yurivish/32/198_2.png) [@yurivish](https://talk.observablehq.com/u/yurivish)\
**Post date:** [October 24, 2022, 3:56pm UTC](https://talk.observablehq.com/t/do-notebooks-have-a-default-width-variable-does-it-set-automatically/7188/2 "2022-10-24T15:56:41Z")

</div>

The `width` variable is available in all notebooks as part of the Observable stdlib, and is a reactive variable updates when the page resizes: [GitHub - observablehq/stdlib: The Observable standard library.](https://github.com/observablehq/stdlib#width)

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [October 24, 2022, 7:39pm UTC](https://talk.observablehq.com/t/do-notebooks-have-a-default-width-variable-does-it-set-automatically/7188/3 "2022-10-24T19:39:47Z")

</div>

Be aware that being reactive means that changing the width of the browser window will invalidate (rerun) all cells that rely on `width`.

If you find that to be a problem, have a look at [Efficient Responsiveness / Fabian Iwand / Observable](https://observablehq.com/@mootari/match-media)
