# Text Sizing Control

**URL:** <https://forums.realmacsoftware.com/t/text-sizing-control/44906>\
**Category:** Elements API\
**Created:** [October 8, 2024, 6:06pm UTC](https://forums.realmacsoftware.com/t/text-sizing-control/44906 "2024-10-08T18:06:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/bill/32/107_2.png) [@Bill](https://forums.realmacsoftware.com/u/Bill)\
**Post date:** [October 8, 2024, 6:06pm UTC](https://forums.realmacsoftware.com/t/text-sizing-control/44906/1 "2024-10-08T18:06:23Z")

</div>

I just wanted to verify that this is the way to set text sizing for various devices. I want the smallest device size (I believe xs) at sm size and base device at base size & above:

```auto
{
  "title": "Text Size:",
  "id": "textsize",
  "themeTextStyle": {
    "default": {
      "xs": {"name": "sm"},
      "base": {"name": "base"}
    }
  }
}

```

Which generates this class: text-base

---

<div class="post-metadata">

**Author:** ![ben](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ben/32/28488_2.png) [@ben](https://forums.realmacsoftware.com/u/ben)\
**Post date:** [October 9, 2024, 9:35am UTC](https://forums.realmacsoftware.com/t/text-sizing-control/44906/2 "2024-10-09T09:35:32Z")

</div>

the syntax is correct, however the keys for the default object are incorrect.

- an `xs` screen size does not exist.
- `base` is from 0px and upwards (so anything below the `sm` screen).

The following should do what you’re asking for:

```auto
{
  "title": "Text Size:",
  "id": "textsize",
  "themeTextStyle": {
    "default": {
      "base": { "name": "sm"},
      "sm": {"name": "base"}
    }
  }
}

```

Check the screens are in the Theme Studio and you’ll see the available screen sizes.

 ![Screenshot 2024-10-09 at 11.33.53](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/d/1/d1c5f94e26a92f3d14b26660ab68ad695ff678c1.jpeg)

---

<div class="post-metadata">

**Author:** ![Bill](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/bill/32/107_2.png) [@Bill](https://forums.realmacsoftware.com/u/Bill)\
**Post date:** [October 11, 2024, 3:07pm UTC](https://forums.realmacsoftware.com/t/text-sizing-control/44906/3 "2024-10-11T15:07:30Z")

</div>

On the screen sizes could you please label Mobile as Base or put base in parenthesis as it’s confusing when using the screens window for reference.
