123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- ---
- id: title-options
- title: Title Options
- sidebar_label: Title
- ---
-
- Controls the top bar title.
-
- ```js
- const options = {
- topBar: {
- title: {}
- }
- };
- ```
-
- ### `text`
-
- Set the title for the TopBar.
-
- | Type | Required | Platform |
- | ------ | -------- | -------- |
- | string | No | Both |
-
- ### `fontSize`
-
- Set the title font size. On Android this value is in `sp`.
-
- | Type | Required | Platform |
- | ------ | -------- | -------- |
- | number | No | Both |
-
- ### `color`
-
- Set the title color.
-
- | Type | Required | Platform |
- | ----- | -------- | -------- |
- | Color | No | Both |
-
- ### `fontFamily`
-
- Set the title font family.
-
- | Type | Required | Platform |
- | ---------- | -------- | -------- |
- | FontFamily | No | Both |
-
- ### `alignment`
-
- `fill` will make the title stretch and consume all available space in the TopBar while `center` will center the title in the middle of the TopBar.
-
- :::info defaults
- `center` is the default option on iOS while `fill` is the default for Android.
- :::
-
- | Type | Required | Platform |
- | --------------------- | -------- | -------- |
- | enum('center','fill') | No | Both |
-
- ### `component`
-
- Set a react [component](api-component.mdx) as the title. If this option is specified then text is ignored.
-
- | Type | Required | Platform |
- | --------- | -------- | -------- |
- | Component | No | Both |
-
- ### `topMargin`
-
- Change to TopBar's top margin.
-
- | Type | Required | Platform |
- | ------ | -------- | -------- |
- | number | No | Android |
-
- ### `visible`
-
- Determines whether the TopBar is visible or not.
-
- | Type | Required | Platform |
- | ------- | -------- | -------- |
- | boolean | No | Both |
|