# @Builder @Builder装饰的方法用于定义组件的声明式UI描述,在一个自定义组件内快速生成多个布局内容。\@Builder装饰方法的功能和语法规范与[build函数](ts-function-build.md)相同。 ``` @Entry @Component struct CompA { size : number = 100; @Builder SquareText(label: string) { Text(label) .width(1 * this.size) .height(1 * this.size) } @Builder RowOfSquareTexts(label1: string, label2: string) { Row() { this.SquareText(label1) this.SquareText(label2) } .width(2 * this.size) .height(1 * this.size) } build() { Column() { Row() { this.SquareText("A") this.SquareText("B") // or as long as tsc is used } .width(2 * this.size) .height(1 * this.size) this.RowOfSquareTexts("C", "D") } .width(2 * this.size) .height(2 * this.size) } } ```