back
Browser detection
Import Browser from @waaark/luge, register it with luge.addPlugin('browser', Browser), then call luge.init(). See Getting started for a complete setup.
luge includes Bowser to detect browser name and version. The Bowser instance is globally available on luge.browser to do your own checks.
CSS classes
The following CSS classes are added to the html element depending on the user’s browser:
is-mobilewhen the user uses a mobile ;is-tabletwhen the user uses a tablet ;is-handheldwhen the user uses either a mobile or a tablet ;is-desktopwhen the user uses a computer ;is-safariwhen the user uses Safari, plus anis-safari-[version]class containing the detected version number.