bulmaBox(
bulmaBoxMedia(
src = "https://bulma.io/images/placeholders/128x128.png",
"Box Content"
)
)
You can install
shinybulma
from github with
devtool::install_github('JohnCoene/shinybulma')
library(shiny)
library(shinybulma)
ui <- bulmaPage(
bulmaContainer(
bulmaTitle('shinybulma'),
plotOutput('plot')
)
)
server <- function(input, output){
output$plot <- renderPlot({
plot(mtcars$mpg, mtcars$qsec)
})
}
shinyApp(ui, server)
You can wrap elements in
bulmaContainer
to add a
<div class='container'></div>
.
To use the grid, simply use
bulmaColumn
which you must wrap in
bulmaColumns
.
bulmaColumns(
bulmaColumn('First column'),
bulmaColumn('Second column')
)
Columns folow the traditional 12-columns schema and, in
shinybulma
are optional.
bulmaBox(
bulmaBoxMedia(
src = "https://bulma.io/images/placeholders/128x128.png",
"Box Content"
)
)
Card title
bulmaCard(
bulmaCardHeader(
bulmaCardHeaderTitle(
"Card title"
)
),
bulmaCardContent(
"Content of the card."
),
bulmaCardFooter(
bulmaCardFooterItem(
"Item 1"
),
bulmaCardFooterItem(
"Item 2"
)
)
)
bulmaHeroBody(
bulmaContainer(
bulmaTitle("Hello Bulma*"),
bulmaSubtitle("shinybulma*")
)
)
bulmaLevelOutput("levels") # in ui
# in server
output$levels <- renderBulmaLevel({
bulmaLevel(
bulmaLevelItem("Tweets", sample(100:5000, 1)),
bulmaLevelItem("Following", sample(100:5000, 1)),
bulmaLevelItem("Followers", sample(100:5000, 1))
)
})
A message
bulmaMessage(
size = "large",
header = TRUE,
header_title = "The title",
"The content of the message"
)
Sidebar
# in ui
bulmaSidebarTrigger()
bulmaSidebar(
bulmaContainer(
header_title = "Sidebar",
bulmaSubtitle("Works with inputs"),
bulmaSliderInput("slider", color = "warning", 10, 3, 150)
)
)