# Building the Home Page
The application home page displays air quality information of the current city. There are two screens on the home page. Each screen displays the air quality information of a city, including the AQI and city name. The AQI value can be displayed in the form of a ring progress bar with animation.
1. The **** component is required to implement the switch between the two screens.
Add a root **** to the **.hml** file. Note that each **.hml** file can contain only one root component. The code snippet is as follows:
```
```
- **class="container"** indicates the style used by the component. The **container** is a style class in the **index.css** file. The code snippet is as follows:
```
.container{
height: 454px;
width: 454px;
}
```
This style class sets the height and width of the component. For device-side development, the component height and width must be explicitly specified. Otherwise, the component may fail to be displayed.
- **index="\{\{swiperPage\}\}" duration="500" onchange="swiperChange"** sets the component attribute and event. **duration="500"** indicates that the duration of the swiping animation is 500 ms.
- **index="\{\{swiperPage\}\}"** specifies the index of the child component of ****. **\{\{swiperPage\}\}** indicates that the index value is dynamically bound to the **swiperPage** variable in the JavaScript code. The index value changes with the **swiperPage** value.
- **onchange="swiperChange"** binds the change event of the **** component to the **swiperChange** function. The JavaScript code is as follows:
```
// Import the router module for page switch.
import router from'@system.router'
export default {
// Define parameters.
data: {
swiperPage:0 // The first page is displayed by default.
},
onInit () {
},
// Swiping event, which saves the index value of the current . The index value is saved to the swiperPage variable each time a swiping occurs.
swiperChange (e) {
this.swiperPage = e.index;
}
}
```
2. Set the information about each city to be displayed on a screen. In each screen, four types of information need to be displayed using different components.
Add two child components \(****\) to the ****. Add the ****, ****, and **