UNPKG

use-container-queries

Version:

A react hook that tracks a containers size and the range that width falls into within a list of breakpoints. This allows better responsive styling, where the user can style DOM elements based on their container, rather than the browser viewport.

18 lines (10 loc) 514 B
# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] - Add ability for user to supply their own ref to the hook - Set `boxType` as a config option for user to choose between border and content box (ResizeObserver v2 options) ## [1.0.0] - 2021-02-19 ### Added - Initial release of library