# tys.elements()

> Creates an elements group: the appearance and language shared by the elements you create from it.

Source: https://docs.tryyoursize.com/reference/web/client-elements/

*Method* · `@tryyoursize/sdk`

Creates an elements group: the appearance and language shared by the elements you create from it.

```ts
elements(options?: ElementsOptions): Elements;
```

## Parameters

- **`options`** (`ElementsOptions`, optional)
  - **`appearance`** (`Appearance`, optional): Look and feel. By default (`theme: "inherit"`) elements take your page's font and colours. See `Appearance`(/reference/web/appearance/).
  - **`locale`** (`Locale`, optional)

## Returns

`Elements`: An `Elements` group: `create()`, `getElement()`, `update()`.

## Example

**JavaScript**

```js
const elements = tys.elements({
  appearance: { variables: { colorPrimary: "#3b2f26", borderRadius: 10 } },
  locale: "auto",
});
```

**React**

```tsx
<TryYourSizeProvider
  publishableKey="pk_test_…"
  options={{ appearance: { variables: { colorPrimary: "#3b2f26", borderRadius: 10 } } }}
>
```
