Skip to contents

Create a Rating component

Usage

calcite_rating(...)

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
averageaverageSpecifies a cumulative average from previous ratings to display.numberTRUE
countcountSpecifies the number of previous ratings to display.numberTRUE
disableddisabledWhen true, interaction is prevented and the component is displayed with lower opacity.booleanTRUE
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
messageOverridesNAUse this property to override individual strings used by the component.Check API referenceFALSE
namenameSpecifies the name of the component. Required to pass the component's value on form submission.stringTRUE
readOnlyread-onlyWhen true, the component's value can be read, but cannot be modified.booleanTRUE
scalescaleSpecifies the size of the component."l" | "m" | "s"TRUE
showChipshow-chipWhen true, and if available, displays the average and/or count data summary in a calcite-chip.booleanTRUE
statusstatusSpecifies the status of the input field, which determines message and icons."idle" | "invalid" | "valid"TRUE
validationIconvalidation-iconSpecifies the validation icon to display under the component.boolean | stringTRUE
validationMessagevalidation-messageSpecifies the validation message to display under the component.stringFALSE
validityNAThe current validation state of the component.Check API referenceFALSE
valuevalueThe component's value.numberTRUE

Events

The following events are observed by shiny:

EventDescription
calciteRatingChangeFires when the component's value changes.

Examples

calcite_rating()
#> <calcite-rating></calcite-rating>