> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nativedesktop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Check Access

When using the native-desktop Core Library, it is important to **verify whether your application is running inside the native-desktop environment** or a regular web browser. The library’s features only work when the application is running inside Native Desktop.

You can perform this check using the `isInNativeDesktop()` function. For example:

```typescript theme={null}
import { isInNativeDesktop } from '@native-desktop/core';

const sampleFunction = () => {
  const inNativeDesktop = isInNativeDesktop();

  if (inNativeDesktop) {
    // Execute Native Desktop-specific code here
  }
}
```

Performing this check is necessary to prevent unexpected errors when the application runs in a normal browser.

<Warning>
  If you are using frameworks like Next.js, the Core Library only works on the **client side**. You must add `use client` at the top of your page. Server-side rendered pages cannot access the Native Desktop Core Library.
</Warning>
