---
title: draftMode
description: API Reference for the draftMode function.
---

The `draftMode` function allows you to detect [Draft Mode](/docs/app/building-your-application/configuring/draft-mode) inside a [Server Component](/docs/getting-started/react-essentials).

```jsx filename="app/page.js"
import { draftMode } from 'next/headers'

export default function Page() {
  const { isEnabled } = draftMode()
  return (
    <main>
      <h1>My Blog Post</h1>
      <p>Draft Mode is currently {isEnabled ? 'Enabled' : 'Disabled'}</p>
    </main>
  )
}
```

## Version History

| Version   | Changes                 |
| --------- | ----------------------- |
| `v13.4.0` | `draftMode` introduced. |
