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

Help improve this page