---
title: Reference - device macros
related:
  - https://docs.kentico.com/k8/developing-websites/developing-websites-for-mobile-devices/enabling-mobile-development.md
  - https://docs.kentico.com/k8/macro-expressions.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

### CurrentDevice

The _CurrentDevice_ object holds information about the device detected for the current visitor. The system identifies devices based on their user agent and retrieves the data about the capabilities of devices from the integrated 3rd party component [51degrees.mobi](http://51degrees.mobi/) or the _\~\App\_Data\CMSModules\DeviceProfile\devices.xml_ file.

You can take advantage of the _CurrentDevice_ object when defining conditions for device profiles and in general [macro expressions](https://docs.kentico.com/k8/macro-expressions.md).

The following list presents the properties of the **CurrentDevice** object. Most of the properties are only available in the [51degrees.mobi Premium data](https://docs.kentico.com/k8/developing-websites/developing-websites-for-mobile-devices/enabling-mobile-development.md#using-51degrees.mobi-device-data):

- BitsPerPixel - color depth that the device's display supports.
- BrowserName
- BrowserVendor
- BrowserVersion
- CcppAccept - list of MIME types that the device supports.
- CookiesCapable - indicates if the device can accept cookies.
- DeviceName
- HardwareModel
- HardwareName
- HardwareVendor
- HasCamera
- HasKeypad
- HasQwertyPad
- HasTouchscreen
- HasTrackpad
- HasVirtualQwerty
- HtmlVersion
- IsCrawler
- IsMobile
- IsTablet
- JavaScript - indicates if the device supports JavaScript.
- LayoutEngine - name of the rendering engine that the device uses.
- MaxScreenSize - size of the longer side of the device's screen.
- PlatformName
- PlatformVendor
- PlatformVersion
- ScreenPixelsHeight
- ScreenPixelsWidth
- StreamingAccept
- SupportedBearers
- UserAgent

### CurrentDeviceProfile

To get information about the device profile assigned to the current visitor, use the _CurrentDeviceProfile_ object in macros:

- You can access the device profile's system data through its properties, for example: _{% CurrentDeviceProfile.ProfilePreviewWidth %}_
- To directly get the device profile's name, use the following expression: _{% CurrentDeviceProfileName %}_
