View source: R/spsUIcollections.R
hrefTab | R Documentation |
hrefTab
creates a small section of link buttons
hrefTab(
label_texts,
hrefs,
Id = NULL,
title = "A list of tabs",
title_color = "#0275d8",
bg_colors = "#337ab7",
text_colors = "white",
target_blank = FALSE,
...
)
label_texts |
individual tab labels |
hrefs |
individual tab links |
Id |
optional element ID |
title |
element title |
title_color |
title color |
bg_colors |
individual tab button background color, either 1 value to apply for all of them or specify for each of them in a vector |
text_colors |
individual tab button text color, either 1 value to apply for all of them or specify for each of them in a vector |
target_blank |
bool, whether to add |
... |
other arguments to be passed to the html element |
label_texts
, hrefs
must be the same length
If more than one value is provided for bg_colors
or/and text_colors
,
the length of these 2 vectors must be the same as label_texts
Use ""
to occupy the space if you do not want a label contains a link,
e.g hrefs = c("https://google.com/", "", "")
If a label does not have a link, you cannot click it and there is no hovering effects.
a Shiny component
if(interactive()){
ui <- fluidPage(
hrefTab(
title = "Default",
label_texts = c("Bar Plot", "PCA Plot", "Scatter Plot"),
hrefs = c("https://google.com/", "", "")
),
hrefTab(
title = "Different background",
label_texts = c("Bar Plot", "PCA Plot", "Scatter Plot"),
hrefs = c("https://google.com/", "", ""),
bg_colors = c("#eee", "orange", "green")
),
hrefTab(
title = "Different background and text colors",
label_texts = c("Bar Plot", "Disabled", "Scatter Plot"),
hrefs = c("https://google.com/", "", ""),
bg_colors = c("green", "#eee", "orange"),
text_colors = c("#caffc1", "black", "blue")
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.