# Code Assistance - SingleValue Label change Font-Size

**URL:** <https://community.dynatrace.com/t/code-assistance-singlevalue-label-change-font-size/48617>\
**Category:** Developer Q&A Forum\
**Tags:** dynatrace-app-toolkit, custom-app, coding-assistance\
**Created:** [October 29, 2024, 6:00pm UTC](https://community.dynatrace.com/t/code-assistance-singlevalue-label-change-font-size/48617 "2024-10-29T18:00:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaximilianoML](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/maximilianoml/32/25038_2.png) [@MaximilianoML](https://community.dynatrace.com/u/MaximilianoML)\
**Post date:** [October 29, 2024, 6:00pm UTC](https://community.dynatrace.com/t/code-assistance-singlevalue-label-change-font-size/48617/1 "2024-10-29T18:00:00Z")

</div>

Hello guys!

I need some help with code, I wanna know if is there a way to change the Font Size of the Label in the React component:

 ![MaximilianoML_1-1730224550882.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/f/df3ae3993b593171a6eb3417d11c72eb38c909dc.png)

 ![MaximilianoML_3-1730224675997.png](https://global.discourse-cdn.com/dynatrace/original/2X/9/9d6700a57671446e5687aa86c7cd528bf36b0056.png)

Thank you, for all 🙂

---

<div class="post-metadata">

**Author:** ![imsingh](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/imsingh/32/7858_2.png) [@imsingh](https://community.dynatrace.com/u/imsingh)\
**Post date:** [October 30, 2024, 8:46am UTC](https://community.dynatrace.com/t/code-assistance-singlevalue-label-change-font-size/48617/2 "2024-10-30T08:46:20Z")

</div>

Hi&nbsp;[@MaximilianoML](https://community.dynatrace.com/user/73851)

AFAIK, The SingleValue component doesn’t provide a way to change the size of a label.

You can of course change it via CSS since label has a specific class applied to it. However, I wouldn’t recommend it.

What’s your usecase?

Thanks

---

<div class="post-metadata">

**Author:** ![MaximilianoML](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/maximilianoml/32/25038_2.png) [@MaximilianoML](https://community.dynatrace.com/u/MaximilianoML)\
**Post date:** [October 30, 2024, 9:22am UTC](https://community.dynatrace.com/t/code-assistance-singlevalue-label-change-font-size/48617/3 "2024-10-30T09:22:21Z")

</div>

Hi&nbsp;[@imsingh](https://community.dynatrace.com/user/52863)

Using CSS is a good idea, I tried but I didn’t find a way to change by CSS… I want to reduce 50% of the size.

If you have a code snippet to active this, let me know 🙂

Thanks a lot,

Maximiliano Lopes

---

<div class="post-metadata">

**Author:** ![imsingh](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/imsingh/32/7858_2.png) [@imsingh](https://community.dynatrace.com/u/imsingh)\
**Post date:** [November 12, 2024, 2:54pm UTC](https://community.dynatrace.com/t/code-assistance-singlevalue-label-change-font-size/48617/4 "2024-11-12T14:54:49Z")

</div>

Hi MaximilianoML

Can you try the following code snippet without label property but using a Heading component? This give you more control than using the `label` property.

```markup
<StyledContainer>
        <Heading level={6}>My Custom Label</Heading>
        <SingleValue
          data={70000000}
          formatter={formatter}
          prefixIcon={<ViewIcon />}
          unit={'B'}
        />
      </StyledContainer>

```

---

<div class="post-metadata">

**Author:** ![MaximilianoML](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/maximilianoml/32/25038_2.png) [@MaximilianoML](https://community.dynatrace.com/u/MaximilianoML)\
**Post date:** [November 14, 2024, 5:29pm UTC](https://community.dynatrace.com/t/code-assistance-singlevalue-label-change-font-size/48617/5 "2024-11-14T17:29:44Z")

</div>

Perfect!

Great and simple solution, thank you! 😁
