npm.io
0.1.1 • Published 2 years ago

@bozzhik/is-mobile

Licence
MIT
Version
0.1.1
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
5

Overview

The @bozzhik/is-mobile variable is a utility designed to determine whether the current device is considered mobile, based on browser identification.

Installation

To install the isMobile variable, you can use npm:

npm install @bozzhik/is-mobile

Example

In this case, the desired component will be drawn based on the device:

import {isMobile} from '@bozzhik/is-mobile'

function Component() {
  return isMobile ? <Mobile /> : <Desktop />
}