Skip to contents

Create a Button component

Usage

calcite_button(...)

Arguments

...

named attributes passed to htmltools::tag()

Value

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

Details

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

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
alignmentalignmentSpecifies the alignment of the component's elements."center" | "end" | "icon-end-space-between" | "icon-start-space-between" | "space-between" | "start"TRUE
appearanceappearanceSpecifies the appearance style of the component."outline" | "outline-fill" | "solid" | "transparent"TRUE
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
formformThe id of the form that will be associated with the component. When not set, the component will be associated with its ancestor form element, if any.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
kindkindSpecifies the kind of the component, which will apply to the border and background if applicable."brand" | "danger" | "inverse" | "neutral"TRUE
labellabelAccessible name for the component.stringFALSE
loadingloadingWhen true, a busy indicator is displayed and interaction is disabled.booleanTRUE
messageOverridesNAUse this property to override individual strings used by the component.Check API referenceFALSE
namenameSpecifies the name of the component on form submission.stringTRUE
relrelDefines the relationship between the href value and the current document.stringTRUE
roundroundWhen true, adds a round style to the component.booleanTRUE
scalescaleSpecifies the size of the component."l" | "m" | "s"TRUE
splitChildsplit-childSpecifies if the component is a child of a calcite-split-button."primary" | "secondary" | booleanTRUE
targettargetSpecifies where to open the linked document defined in the href property.stringTRUE
typetypeSpecifies the default behavior of the component.stringTRUE
widthwidthCheck API reference"auto" | "full" | "half"TRUE

Slots

The following slots are provided by this component:

SlotDescription
Default (unnamed)A slot for adding text.

Examples

calcite_button()
#> <calcite-button></calcite-button>