> For the complete documentation index, see [llms.txt](https://trixtateam.gitbook.io/trixta-js-core/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trixtateam.gitbook.io/trixta-js-core/reference/hooks/usetrixtaaccess.md).

# useTrixtaAccess

A react hook that will return true if the given roleName has access.

```jsx
import { useTrixtaAccess } from '@trixtateam/trixta-js-core';
const hasAccess = useTrixtaAccess({ roleName });

```

### Options

* `roleName : string`
  * Trixta role name

### Returns

* `boolean`

  * Will be `true` if the `roleName` mentioned above has access.
