> For the complete documentation index, see [llms.txt](https://skyslit.gitbook.io/magicjs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://skyslit.gitbook.io/magicjs/api-references/frontend/protected.md).

# protected()

> Example:

```typescript
import { Protected } from '@magicjs.dev/frontend';

return (
  <Protected>
    <div>This is protected content.</div>
  </Protected>
);
```

> In this example, the content enclosed within the component is rendered exclusively for authenticated users. If a user lacks authentication, the content remains invisible.

[Click here to refer GitHub.](https://github.com/skyslit/magicjs.dev/blob/main/packages/frontend/src/index.tsx#L579)
