1e41f4b71Sopenharmony_ci# Blank
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ciThe **\<Blank>** component is able to automatically fill the empty spaces in the container along the main axis. It works only when the parent component is **\<Row>**, **\<Column>**, or **\<Flex>**.
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci>  **NOTE**
6e41f4b71Sopenharmony_ci>
7e41f4b71Sopenharmony_ci>  This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci## Child Components
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ciNot supported
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ci## APIs
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ciBlank(min?: number | string)
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ciSince API version 10:
20e41f4b71Sopenharmony_ci - On the main axis of the parent container **\<Row>**, **\<Column>**, or **\<Flex>**, if the size of the **\<Blank>** component is not set, the component will be automatically stretched or shrunk; if the size is not set or the container adapts to the size of its child component, the component will not be stretched or shrunk.
21e41f4b71Sopenharmony_ci - Relationship between **size** and **min** of the **\<Blank>** component on the main axis: max(min, size).
22e41f4b71Sopenharmony_ci - On the cross axis of the parent container, if the size of the **\<Blank>** component is set, the component will not fill up the parent container; if the size is not set, the component will fill up the parent container, following the default **alignSelf** settings **ItemAlign.Stretch**.
23e41f4b71Sopenharmony_ci
24e41f4b71Sopenharmony_ciThis API can be used in ArkTS widgets since API version 9.
25e41f4b71Sopenharmony_ci
26e41f4b71Sopenharmony_ci**Parameters**
27e41f4b71Sopenharmony_ci
28e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description|
29e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
30e41f4b71Sopenharmony_ci| min | number \| string | No| Minimum size of the **\<Blank>** component in the container along the main axis.<br>Default value: **0**<br>**NOTE**<br>This parameter cannot be set in percentage. If the value is negative, the default value is used. If the minimum size is larger than the available space of the container, it is used as the component size, and the component extends beyond the container.|
31e41f4b71Sopenharmony_ci
32e41f4b71Sopenharmony_ci## Attributes
33e41f4b71Sopenharmony_ci
34e41f4b71Sopenharmony_ciIn addition to the [universal attributes](ts-universal-attributes-size.md), the following attributes are supported.
35e41f4b71Sopenharmony_ci
36e41f4b71Sopenharmony_ci| Name| Type| Description|
37e41f4b71Sopenharmony_ci| -------- | -------- | -------- |
38e41f4b71Sopenharmony_ci| color | [ResourceColor](ts-types.md#resourcecolor) | Color to fill the empty spaces.<br>Default value: **Color.Transparent**<br>This API can be used in ArkTS widgets since API version 9.|
39e41f4b71Sopenharmony_ci
40e41f4b71Sopenharmony_ci## Events
41e41f4b71Sopenharmony_ci
42e41f4b71Sopenharmony_ciThe [universal events](ts-universal-events-click.md) are supported.
43e41f4b71Sopenharmony_ci
44e41f4b71Sopenharmony_ci## Example
45e41f4b71Sopenharmony_ci
46e41f4b71Sopenharmony_ci### Example 1
47e41f4b71Sopenharmony_ciThe sample below shows how the **\<Blank>** component fills the empty spaces in the container in landscape and portrait modes.
48e41f4b71Sopenharmony_ci```ts
49e41f4b71Sopenharmony_ci// xxx.ets
50e41f4b71Sopenharmony_ci@Entry
51e41f4b71Sopenharmony_ci@Component
52e41f4b71Sopenharmony_cistruct BlankExample {
53e41f4b71Sopenharmony_ci  build() {
54e41f4b71Sopenharmony_ci    Column() {
55e41f4b71Sopenharmony_ci      Row() {
56e41f4b71Sopenharmony_ci        Text('Bluetooth').fontSize(18)
57e41f4b71Sopenharmony_ci        Blank()
58e41f4b71Sopenharmony_ci        Toggle({ type: ToggleType.Switch }).margin({ top: 14, bottom: 14, left: 6, right: 6 })
59e41f4b71Sopenharmony_ci      }.width('100%').backgroundColor(0xFFFFFF).borderRadius(15).padding({ left: 12 })
60e41f4b71Sopenharmony_ci    }.backgroundColor(0xEFEFEF).padding(20)
61e41f4b71Sopenharmony_ci  }
62e41f4b71Sopenharmony_ci}
63e41f4b71Sopenharmony_ci```
64e41f4b71Sopenharmony_ci
65e41f4b71Sopenharmony_ciPortrait mode
66e41f4b71Sopenharmony_ci
67e41f4b71Sopenharmony_ci![en-us_image_0000001256858407](figures/en-us_image_0000001256858407.gif)
68e41f4b71Sopenharmony_ci
69e41f4b71Sopenharmony_ciLandscape mode
70e41f4b71Sopenharmony_ci
71e41f4b71Sopenharmony_ci![en-us_image_0000001212378418](figures/en-us_image_0000001212378418.gif)
72e41f4b71Sopenharmony_ci
73e41f4b71Sopenharmony_ci
74e41f4b71Sopenharmony_ci### Example 2
75e41f4b71Sopenharmony_ciSet the **min** parameter when the width of the parent container of the **\<Blank>** component is not set.
76e41f4b71Sopenharmony_ci
77e41f4b71Sopenharmony_ci```ts
78e41f4b71Sopenharmony_ci// xxx.ets
79e41f4b71Sopenharmony_ci@Entry
80e41f4b71Sopenharmony_ci@Component
81e41f4b71Sopenharmony_cistruct BlankExample {
82e41f4b71Sopenharmony_ci  build() {
83e41f4b71Sopenharmony_ci    Column({ space: 20 }) {
84e41f4b71Sopenharmony_ci      // If the width of the parent container is not set, the \<Blank> component becomes invalid. In this case, you can set min to specify the minimum width of the \<Blank> component.
85e41f4b71Sopenharmony_ci      Row() {
86e41f4b71Sopenharmony_ci        Text('Bluetooth').fontSize(18)
87e41f4b71Sopenharmony_ci        Blank().color(Color.Yellow)
88e41f4b71Sopenharmony_ci        Toggle({ type: ToggleType.Switch }).margin({ top: 14, bottom: 14, left: 6, right: 6 })
89e41f4b71Sopenharmony_ci      }.backgroundColor(0xFFFFFF).borderRadius(15).padding({ left: 12 })
90e41f4b71Sopenharmony_ci
91e41f4b71Sopenharmony_ci      Row() {
92e41f4b71Sopenharmony_ci        Text('Bluetooth').fontSize(18)
93e41f4b71Sopenharmony_ci        // Set the minimum width to 160.
94e41f4b71Sopenharmony_ci        Blank('160').color(Color.Yellow)
95e41f4b71Sopenharmony_ci        Toggle({ type: ToggleType.Switch }).margin({ top: 14, bottom: 14, left: 6, right: 6 })
96e41f4b71Sopenharmony_ci      }.backgroundColor(0xFFFFFF).borderRadius(15).padding({ left: 12 })
97e41f4b71Sopenharmony_ci
98e41f4b71Sopenharmony_ci    }.backgroundColor(0xEFEFEF).padding(20).width('100%')
99e41f4b71Sopenharmony_ci  }
100e41f4b71Sopenharmony_ci}
101e41f4b71Sopenharmony_ci```
102e41f4b71Sopenharmony_ciIf the width of the parent container is not set, set **min** to specify the minimum width of the **\<Blank>** component.
103e41f4b71Sopenharmony_ci
104e41f4b71Sopenharmony_ci![blankmin](figures/blankmin.png)
105