Skip to content

Repository files navigation


A library for adding responsive styles to components with dash-ui

npm i @dash-ui/responsive

BundlephobiaTypesCode coverageBuild statusNPM VersionMIT License


Quick start

import{styles}from'@dash-ui/styles'importresponsivefrom'@dash-ui/responsive'constresponsiveStyle=responsive(styles,{phone: 'only screen and (min-width: 0em)'tablet: 'only screen and (min-width: 20em)'desktop: 'only screen and (min-width: 50em)'})constmyResponsiveStyle=responsiveStyle.variants({default: {display: 'block'},flex: {display: 'flex'}})constMyComponent=({display})=>{return<divclassName={myResponsiveStyle(display)}/>}<MyComponentdisplay={{phone: 'default',tablet: 'flex'}}/>

API

responsive.variants()

Arguments

NameTypeDefaultRequired?Description

responsive.lazy()

responsive.one()

responsive.cls()

LICENSE

MIT

About

A library for adding responsive style props to components with @dash-ui

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages