Skip to contents

Create a Link component

Usage

calcite_link(...)

Arguments

...

named attributes passed to htmltools::tag()

Value

an object of class calcite_component which is a subclass of shiny.tag

Details

Any attributes placed on component will propagate to the rendered child Passing a 'href' will render an anchor link, instead of a span. Role will be set to link, or link, depending on this. It is the consumers responsibility to add aria information, rel, target, for links, and any link attributes for form submission

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
disableddisabledWhen true, interaction is prevented and the component is displayed with lower opacity.booleanTRUE
downloaddownloadPrompts the user to save the linked URL instead of navigating to it. Can be used with or without a value: Without a value, the browser will suggest a filename/extension.boolean | stringTRUE
hrefhrefSpecifies the URL of the linked resource, which can be set as an absolute or relative path.stringTRUE
iconEndicon-endSpecifies an icon to display at the end of the component.stringTRUE
iconFlipRtlicon-flip-rtlDisplays the iconStart and/or iconEnd as flipped when the element direction is right-to-left ("rtl")."both" | "end" | "start"TRUE
iconStarticon-startSpecifies an icon to display at the start of the component.stringTRUE
relrelSpecifies the relationship to the linked document defined in href.stringFALSE
targettargetSpecifies the frame or window to open the linked document.stringFALSE

Slots

The following slots are provided by this component:

SlotDescription
Default (unnamed)A slot for adding text.

Examples

calcite_link()
#> <calcite-link></calcite-link>