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

# AssessmentPortal.isOpen()

> Check whether the assessment overlay is currently mounted in the DOM.

<Info>
  This is a **Frontend SDK method**.
</Info>

## Signature

```typescript theme={null}
AssessmentPortal.isOpen(): boolean
```

Returns `true` if the overlay is currently visible, `false` otherwise.

***

<RequestExample>
  ```typescript Guard against opening twice theme={null}
  // Always check before calling open()
  if (!AssessmentPortal.isOpen()) {
    AssessmentPortal.open({ token, onDone, onClose, onError });
  }
  ```

  ```typescript Conditionally show a banner in React theme={null}
  function RecruiterDashboard() {
    const [portalOpen, setPortalOpen] = useState(false);

    async function startAssessment() {
      // ... get token ...
      AssessmentPortal.open({
        token,
        onDone:  () => setPortalOpen(false),
        onClose: () => setPortalOpen(false),
      });
      setPortalOpen(true);
    }

    return (
      <>
        {portalOpen && <AssessmentInProgressBanner />}
        <button onClick={startAssessment} disabled={portalOpen}>
          Start Assessment
        </button>
      </>
    );
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Portal is open theme={null}
  true
  ```

  ```json Portal is closed theme={null}
  false
  ```
</ResponseExample>
