[Framework examples →](../)

# Vega-Lite responsive width

View live: <https://observablehq.observablehq.cloud/framework-example-vega-responsive/>

This Observable Framework example demonstrates how to implement responsive width in Vega-Lite using Framework’s `resize` built-in, which is implemented with [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver). The chart automatically resizes to fit the container. A reusable helper function `vlresize` is provided in [`src/vlresize.js`](./src/vlresize.js).
