# TitleBar.Title component does not automatically center

**URL:** <https://community.dynatrace.com/t/titlebar-title-component-does-not-automatically-center/46950>\
**Category:** Developer Q&A Forum\
**Tags:** dynatrace-app-toolkit, strato, custom-app, coding-assistance\
**Created:** [August 1, 2024, 1:44pm UTC](https://community.dynatrace.com/t/titlebar-title-component-does-not-automatically-center/46950 "2024-08-01T13:44:48Z")\
**Posts on this page:** 3\
**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:** [August 1, 2024, 1:44pm UTC](https://community.dynatrace.com/t/titlebar-title-component-does-not-automatically-center/46950/1 "2024-08-01T13:44:48Z")

</div>

Hello, Dev Friends!

Today I was changing some titles in my Custom App and then I realized that my&nbsp;[TitleBar.Title](https://developer.dynatrace.com/design/preview/layouts/TitleBar/#use-cases) component was no rendering with the right style, I’ll attach 3 images to explain my point.

My component rendered:

![MaximilianoML_0-1722519459224.png](https://global.discourse-cdn.com/dynatrace/original/2X/3/3a24e614de17653557f6155025be6645511e98a0.png)

My code snippet:

 ![MaximilianoML_1-1722519718626.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/a/ea128c54d315eb68c0bab2fd90708894fdd2fc90.png)

A Dynatrace example of how I want to look like:

![MaximilianoML_2-1722519794405.png](https://global.discourse-cdn.com/dynatrace/original/2X/e/ee67263bad1231963e05776e7b9162c64bc34030.png)

Thank you for your attention 🙂

---

<div class="post-metadata">

**Author:** ![educampver](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/educampver/32/29917_2.png) [@educampver](https://community.dynatrace.com/u/educampver)\
**Post date:** [August 5, 2024, 6:45am UTC](https://community.dynatrace.com/t/titlebar-title-component-does-not-automatically-center/46950/2 "2024-08-05T06:45:49Z")

</div>

Hi&nbsp;[@MaximilianoML](https://community.dynatrace.com/user/73851), the issue is that the icon is taller than the level 3 heading. As I see it you have two options:

1. Remove the heading component and leave the content inside the `<TitleBar.Title>` component. With this option the font size will be larger and cover the whole height of the title bar.
2. If you must keep the smaller font size, you can add custom styles to the&nbsp;`<TitleBar.Title>` component. Something like this should work:

```markup
// App.css
.app-title {
    display: flex;
    align-items: center;
    height: 100%;
}

// App.tsx
import './App.css

<TitleBar.Title className="app-title">
    <Heading level={5}>Cost and Trafic Control</Heading>
</TitleBar.Title>

```

---

<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:** [August 5, 2024, 8:21am UTC](https://community.dynatrace.com/t/titlebar-title-component-does-not-automatically-center/46950/3 "2024-08-05T08:21:38Z")

</div>

Hi&nbsp;[@educampver](https://community.dynatrace.com/user/47555)&nbsp;!

Great! I can’t believe I was styling the wrong component hahahaha

Thank you for your help, my friend!

Have a great day 🙂

Maximiliano Lopes
