UADetect deviceType Componet

Description

Shows whether the client is using a mobile, desktop, or tablet device.

Possible Returns

  • mobile
  • tablet
  • desktop

Usage Example

#1

import { deviceType } from 'uadetect';if (deviceType === 'mobile') {  element.style.display = 'none';}

#2

import { deviceType } from 'uadetect';if (deviceType === 'desktop') {  element.style.display = 'block';}