# useElements()

> The provider's Elements group, or null until the client has loaded.

Source: https://docs.tryyoursize.com/reference/react/use-elements/

*Hook* · `@tryyoursize/react`

The provider's Elements group, or null until the client has loaded.

```ts
function useElements(): Elements | null
```

## Returns

`Elements | null`: The provider's elements group, or `null` until the client has loaded. Throws outside a provider.

## Example

**React**

```tsx
const elements = useElements();
const openGuide = () => elements?.getElement("sizeGuide")?.open();
```
