Adds a border around a component.
.border(config?: { style: Style; width?: number } | Style | number)
Text("Bordered")
.padding(12)
.border(Color("gray"))
Text("Thick border")
.padding(12)
.border({ style: Color("blue"), width: 2 })
Text("Gradient border")
.padding(12)
.border({
style: LinearGradient({
colors: ["red", "blue"],
startPoint: "leading",
endPoint: "trailing"
}),
width: 2
})
Text("Rounded bordered")
.padding(12)
.cornerRadius(8)
.border({ style: Color("blue"), width: 1 })