Skip to contents

Create a Chip component

Usage

calcite_chip(...)

Arguments

...

named attributes passed to htmltools::tag()

Value

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

Details

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
appearanceappearanceSpecifies the appearance style of the component."outline" | "outline-fill" | "solid"TRUE
closableclosableWhen true, a close button is added to the component.booleanTRUE
closedclosedWhen true, hides the component.booleanTRUE
closeOnDeleteclose-on-deleteWhen true, the component closes when the Delete or Backspace key is pressed while focused.booleanTRUE
disableddisabledWhen true, interaction is prevented and the component is displayed with lower opacity.booleanTRUE
iconiconSpecifies an icon to display.stringTRUE
iconFlipRtlicon-flip-rtlWhen true, the icon will be flipped when the element direction is right-to-left ("rtl").booleanTRUE
kindkindSpecifies the kind of the component, which will apply to border and background if applicable."brand" | "inverse" | "neutral"TRUE
labellabelAccessible name for the component.stringFALSE
messageOverridesNAUse this property to override individual strings used by the component.Check API referenceFALSE
scalescaleSpecifies the size of the component. When contained in a parent calcite-chip-group inherits the parent's scale value."l" | "m" | "s"TRUE
selectedselectedWhen true, the component is selected.booleanTRUE
valuevalueThe component's value.anyFALSE

Events

The following events are observed by shiny:

EventDescription
calciteChipCloseFires when the component's close button is selected.
calciteChipSelectFires when the selected state of the component changes.

Slots

The following slots are provided by this component:

SlotDescription
Default (unnamed)A slot for adding text.
imageA slot for adding an image.

Examples

calcite_chip()
#> <calcite-chip></calcite-chip>