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
- 402
- License
- MIT
- Last release
- March 24, 2023
- Activity (30 days)
- 0Closed Issues0Open Issues0Merged PRs0Open PRs