kciter / react-barcode

A <Barcode/> component for use with React.
http://kciter.github.io/react-barcode/
ISC License
400 stars 72 forks source link

Responsive Barcode ? #32

Closed AlexDemzz closed 5 years ago

AlexDemzz commented 5 years ago

Hello, Is it possible to use % instead of px or maybe put a className for the width ?

HuntBurdick commented 5 years ago

Seems to work well responsively by adding a wrapper with a class in Chrome but not so much in Firefox. The barcode does not respect the width of the parent.

HuntBurdick commented 5 years ago

Never mind. Got this to work by adding a parent wrapper div with width 100% and then targeting the outputted SVG with width 100% and height auto CSS styling.

AlexDemzz commented 5 years ago

Never mind. Got this to work by adding a parent wrapper div with width 100% and then targeting the outputted SVG with width 100% and height auto CSS styling.

Smart idea !

famoso96 commented 2 years ago

Quieres hacer la barra responsive, la opcion mas rapida y sin preocuparte por como queda es usar TableContainer de MaterialUI, te dejo en mi casi mi ejemplo que me quedo 100% responsive. TableContainer <Barcode value={codigoBarras} format="CODE39" width={1} height={30} {...config}
/> TableContainer

Saludos!!!