Learn R Programming

inshiny (version 0.1.1)

inline_link: Inline action link

Description

A link widget similar to shiny::actionLink() that can be included in an inline() wrapper.

Usage

inline_link(id, label, icon = NULL, meaning = label, accent = NULL)

Value

An inline widget to be included in an inline() wrapper.

Arguments

id

The input slot that will be used to access the value.

label

The text appearing within the link. This can be a character string or any other HTML, or NULL for no text (but then you will probably at least want an icon).

icon

An optional shiny::icon() which will appear to the left of the link.

meaning

A descriptive label, for people using assistive technology such as screen readers.

accent

A Bootstrap "accent" (such as "primary", "danger", etc.) that will be used to set the class of the link (such as "link-primary", etc.), or NULL for no special styling. See Bootstrap 5 link utilities for all the options. If you provide multiple accents in a character vector, each one will be appended to "link-" and added to the link.

See Also

shiny::actionLink for how the link works with your Shiny server.

Examples

Run this code
ui <- bslib::page_fixed(
    shiny::h1("Link examples"),
    inline("These are ", inline_link("link1", "some"), " ",
        inline_link("link2", "increasingly", accent = "danger"), " ",
        inline_link("link3", "fancy", accent = c("success", "underline-warning", "offset-2")), " ",
        inline_link("link4", "links", icon = shiny::icon("link"), accent = "info"), "!")
)

Run the code above in your browser using DataLab