0.4.1 • Published 4 years ago

@react-stuff/responsive v0.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

React Stuff - Responsive npm (scoped) Netlify

https://react-stuff.netlify.app/

Responsive Provider

This is the root component. It's responsible of:

  • listening to resize events
  • providing breakpoints/current breakpoint values to all its descendants
import { ResponsiveProvider } from '@react-stuff/responsive';

Responsive Container

  • applies a width value based on the current breakpoint
  • will include ResponsiveProvider if breakpoints or isRelativeToParent are directly passed as props
import { ResponsiveContainer } from '@react-stuff/responsive';

Responsive Grid

  • applies the gutter value to its children
  • will include ResponsiveContainer (and ResponsiveProvider) if breakpoints, margins, widths, isRelativeToParent or isCentered are directly passed as props
import { ResponsiveGrid } from '@react-stuff/responsive';

Responsive Unit

Generally used within a block/flex container.

  • applies sizes as a relative width based on its parent
  • applies offsets as a relative margin based on its parent
import { ResponsiveUnit } from '@react-stuff/responsive';