useDensity

Use this hook to adapt your component styling/rendering based on the density.
The density is retrieved from the DensityProvider.

Import

import { useDensity } from '@contentful/f36-utils';

Examples

Component styling

The quick brown fox jumps over the lazy dog like an over-motivated frog.

Help improve this page