0.4.1 • Published 4 years ago
@react-stuff/responsive v0.4.1
React Stuff - Responsive
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
ifbreakpoints
orisRelativeToParent
are directly passed as props
import { ResponsiveContainer } from '@react-stuff/responsive';
Responsive Grid
- applies the
gutter
value to its children - will include
ResponsiveContainer
(andResponsiveProvider
) ifbreakpoints
,margins
,widths
,isRelativeToParent
orisCentered
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';