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.

Reviews

This plugin doesn't have any reviews.

Active Installs
682
Version
3.1
License
MIT
Compatibility
Craft 3, Craft 4, Craft 5
Last release
November 22, 2024
Activity (30 days)
0
Closed Issues
1
Open Issues
0
Merged PRs
0
Open PRs