---
schema_version: "1"
id: d0c09e1aa8cee79f73b9478dc99d938506157dcbc269bf6779ea8ec456034a45
title: Determining the Salesforce Style That Users See in JavaScript
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/styling/pages-styling-javascript-identifying-theme.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-styling-javascript-identifying-theme.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c491bb24a8b908e877c694d6fe89559b3cbbee79cbe28d255c70f4f5b367355f
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# Determining the Salesforce Style That Users See in JavaScript

If you use a lot of JavaScript in your pages and apps, identifying the Salesforce theme that a user sees in JavaScript code is important. Identifying the current user experience context allows you to correctly manage navigation in your JavaScript code.

The `UITheme.getUITheme()` JavaScript function returns a string containing one of the following values to identify the current user interface theme.

-   `Theme1`—Obsolete Salesforce theme
-   `Theme2`—Salesforce Classic 2005 user interface theme
-   `Theme3`—Salesforce Classic 2010 user interface theme
-   `Theme4d`—Modern “Lightning Experience” Salesforce theme
-   `Theme4t`—Salesforce mobile app theme
-   `Theme4u`—Lightning Console theme
-   `PortalDefault`—Salesforce Customer Portal theme
-   `Webstore`—AppExchange theme

The string values returned are the same values returned by the Visualforce `$User.UITheme` and `$User.UIThemeDisplayed` global variables.

The following markup checks if the current user experience context is the Lightning Experience theme.

```javascript
function isLightningDesktop() {
  return UITheme.getUITheme === "Theme4d";
}

```

**See Also**  


-   [Identifying the Salesforce Style Your Users See](https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-styling-salesforce-identifying-theme.md)

