easy-responsive-container

0.1.1 • Public • Published

ResponsiveContainer

A small lib to have a container that supports Bootstrap responsiveness using hooks (???)

What does it do?

It provides a ResponsiveContainer component that will display elements according to Bootstrap breakpoints and that will fall to children if the breakpoint is not specified in the props.

How to use it?

<ResponsiveContainer
  xs={<XSComponent />}
  sm={<SMComponent />}
  md={<MDComponent />}
  lg={<LGComponent />}
  xl={<XLComponent />}
>
  {<FallbackComponent />}
</ResponsiveContainer>

How it works?

<ResponsiveContainter /> adds an onResize listener and adapts rendring according to prefixed screen sizes (see useGetDeviceInfo.ts for more information)

/easy-responsive-container/

    Package Sidebar

    Install

    npm i easy-responsive-container

    Weekly Downloads

    1

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    43.8 kB

    Total Files

    26

    Last publish

    Collaborators

    • igasho