Rating

Overview

Rating component is used to collect and display user feedback in the form of star ratings. This component allows users to rate items, such as products, services, or features, providing valuable insights and feedback.

For example, in a product review section of an e-commerce application, the Rating component can be used to display user feedback on products. Customers can rate their purchased items from 1 to 5 stars, and the average rating will be shown alongside the product details to help other users make informed decisions

image-20240816-103037.png
Rating

Attributes

Attributes are the options available for each component, allowing you to customize its appearance and functionality. They help you tailor the look and behavior of your components to fit your needs.

Basic:

image-20240925-142201.png
Basic

Attribute Name

Description

Attribute Name

Description

Component Size

  • This allows users to modify the size of a specific component according to the grid size of layout.

For example,
If the layout grid size is 3 then layout is divided into 3 sections then you can changes the components size between 1 to 3.

Display As

Display As allows you to select data type options to define how the field will be display.

For example, if you have a text field and choose to display it as a picklist, the data will be stored as text but displayed as a picklist

Label

Here user can add label name for Rating.

Placeholder

A placeholder is a temporary value or text displayed in an input field.

Type

Here user can select the different data type.

Dest Type

This attribute specifies whether the user wants to store a value in a variable or a model.
Variable: If you choose the variable option, you can select the variable where you want to save the field's value. You can bind this variable's value to the component by creating the appropriate variable.

Model: Here, you can select "Model" as the value destination.

Dest Var

Here you can choose the variable option from this list.

Value Destination Model

  • From the value destination model, you can select the specific model where you want to save the field's value.

  • By using a model, you can bind a value to the component, with the value coming from the object used during model creation.

Size

You can adjust the rating size to XX-Small, X-Small, Small, Medium, or Large.

 

Validation:

Attribute Name

Description

Attribute Name

Description

Required Type

You can make the field required by setting the required type.
Here user can select the required type as

  1. Always: The field is always required.

  2. Never: The field is never required.

  3. Conditional Filter: The field is required only if specific conditions are met.

Required Error

Users can add a custom error message for the required field.

Base UI:

Attribute Name

Description

Attribute Name

Description

Padding Location

Padding Location typically refers to the configuration of spacing around elements

Padding Size

Padding Size refers to the amount of space added inside an element, between the element's content and its border or edge.

Margin Location

Margin Location refers to the spacing around the outside edge of an element

Margin Size

Margin Size refers to the amount of space around the outside edges of an element,

Style

  • It is used to apply custom styles to section, such as color, font, size, and more.

  • It allows you to define the appearance of a component by specifying CSS properties directly within the attribute.

  • You can explore more about Styles attribute

Classes

  • It is used to apply SLDS classes to section, if needed.

Hide Space

The Hide Space checkbox removes any empty or extra space around the element when selected.

UI State:

Attribute Name

Description

Visibility Type

It determines whether a component is visible on the layout. It offers the following visibility types:

  1. Always: The component will always be visible.

  2. Conditional: The component's visibility is determined based on specific criteria, which can make it either visible or hidden as needed.
    You can explore more about Visibility Type here

Read Only Type

It specifies whether a component can be edited by users. It offers the following options:

  1. Never: The component will always be editable at any time.

  2. Always: The component will never be editable.

  3. Conditional: The component's editability is determined based on specific criteria, which can make it either editable or read only as needed.

You can explore more about conditional visibility

Disability Type

It determines whether a component is disable on the layout. It offers the following visibility types:

  1. Never: There is no disable option for this component

  2. Always: The component will always be visible.

  3. Conditional: The component's visibility is determined based on specific criteria, which can make it either visible or hidden as needed.
    You can explore more about Visibility Type here.

UI:

Attribute Name

Description

Attribute Name

Description

Layout

Field Layout allows you to arrange fields on the form.
For more details check this

Is Copy Enabled

After marking the checkbox as true, a copy icon will appear beside the name field.

Help Text

Provides additional guidance or information about a field or element to assist users in understanding how to complete it or what data is expected.

Layout:

Attributes

Description

Attributes

Description

None

In the None layout, only the input/output field is visible, with no label displayed.

Stacked

In a stacked layout, the input/output field is placed below the field label, with a small margin around the label.

Horizontal

In a horizontal arrangement, the input/output field is placed before the field label, with a small margin around the label.

Single Column

In a Single Column layout, the input/output field is larger than the field label, and displayed in single column grid.

No Label

In the No Label layout, only the input/output field is visible, without the label.

 

Events:

  • Events are essentially the automation of invoking the component's actions.

  • Here, we have onload event, click event actions are available for this components.

 

Icon Events

Description

Icon Events

Description

onload

This event action is triggered when the Rating component is loaded.

click

This event action is triggered when the Rating component is clicked.

on Load Event: