# NOT RUN {
## Simple box
boxx("Hello there!")
## All border styles
list_border_styles()
## Change border style
boxx("Hello there!", border_style = "double")
## Multiple lines
boxx(c("Hello", "there!"), padding = 1)
## Padding
boxx("Hello there!", padding = 1)
boxx("Hello there!", padding = c(1, 5, 1, 5))
## Margin
boxx("Hello there!", margin = 1)
boxx("Hello there!", margin = c(1, 5, 1, 5))
boxx("Hello there!", padding = 1, margin = c(1, 5, 1, 5))
## Floating
boxx("Hello there!", padding = 1, float = "center")
boxx("Hello there!", padding = 1, float = "right")
## Text color
boxx(col_cyan("Hello there!"), padding = 1, float = "center")
## Backgorund color
boxx("Hello there!", padding = 1, background_col = "brown")
boxx("Hello there!", padding = 1, background_col = bg_red)
## Border color
boxx("Hello there!", padding = 1, border_col = "green")
boxx("Hello there!", padding = 1, border_col = col_red)
## Label alignment
boxx(c("Hi", "there", "you!"), padding = 1, align = "left")
boxx(c("Hi", "there", "you!"), padding = 1, align = "center")
boxx(c("Hi", "there", "you!"), padding = 1, align = "right")
## A very customized box
star <- symbol$star
label <- c(paste(star, "Hello", star), " there!")
boxx(
col_white(label),
border_style="round",
padding = 1,
float = "center",
border_col = "tomato3",
background_col="darkolivegreen"
)
# }
Run the code above in your browser using DataLab