The plugin exposes most of MobileDetect's methods, and can be used in your Twig:

{{ craft.deviceDetect.isMobile ? 'I am mobile.' : 'I am not mobile.' }}

Methods

Detects all mobile devices, both phones and tablets

{{ craft.deviceDetect.isMobile }}

Detects specific devices, either phones or tablets

{{ craft.deviceDetect.isTablet }}
{{ craft.deviceDetect.isPhone }}

Other methods

Detects specific OS

{{ craft.deviceDetect.isiOS }}
{{ craft.deviceDetect.isAndroidOS }}

Detects user agent

{{ craft.deviceDetect.getUserAgent }}
Installation Instructions

To install this plugin, copy the command above to your terminal.

Active Installs
134
Version
1.0.1
License
MIT
Compatibility
Craft 3, Craft 4
Last release
August 25, 2022
Activity (30 days)
0
Closed Issues
0
Open Issues
0
Merged PRs
0
Open PRs