# Progress Bar

<figure><img src="/files/jLZMdeGOWi6zezKiHs3c" alt="" width="375"><figcaption></figcaption></figure>

***

## Changing the properties

### **What Determines Your Progress Bar's Value?**

You have several options for how the progress bar displays its progress:

<figure><img src="/files/YNDEQM2MkCoOY1R0GBiY" alt=""><figcaption></figcaption></figure>

* **Mapped:**
  * Directly link the progress bar to a single Salesforce field or variable.
  * This is ideal for simple scenarios where a single value represents progress (e.g., percentage complete, number of tasks finished).
* **Advanced (Formula):**
  * Create a formula that calculates the progress value by combining multiple fields or variables.
  * This offers more flexibility, allowing you to factor in multiple criteria (e.g., average of multiple scores, weighted progress across different tasks).
* **Query:**
  * Run a Salesforce query to fetch the progress value directly from your data.
  * This is useful for aggregating data across records (e.g., showing overall project completion based on the status of individual tasks). You can use functions like AVG or MAX within your query.

**Example Scenarios**

* **Sales Goal Progress:**
  * **Mapped:** Link the bar to an "Amount Closed" field.
  * **Advanced:** Calculate progress based on "Amount Closed" divided by "Quota."
  * **Query:** Average the "Percent Complete" of all Opportunities in a specific stage.
* **Customer Satisfaction:**
  * **Mapped:** Display the value from a "Customer Satisfaction Score" field.
  * **Advanced:** Combine multiple survey response fields to create a composite score.
  * **Query:** Find the average rating across all customer reviews for a product.

**Choosing the Right Option**

The best option for you depends on the complexity of your progress calculation and where your data resides. The **Mapped** option is quick and easy if you have a simple metric. For more complex calculations, use the **Advanced** formula builder. A **Query** provides the most flexibility if your data needs to be aggregated from multiple records.  &#x20;

### Choosing a Variant and a Theme

**`Variant`** and **`Theme`** attributes define the appearance of the Progress Bar indicator. The Variant lets you choose from Base to Circular.&#x20;

<figure><img src="/files/RvZRQbYcdCn5j2bri6g6" alt=""><figcaption><p>Base VS Circular Variant</p></figcaption></figure>

The **`theme`** attribute lets you define a specific theme for the Progress Theme. Styling settings for a theme can be overridden by using [the Style Panel](/flow/component-builder/style-panel.md).&#x20;

### Adding an avatar

Using the attribute, an avatar can be added next to the Progress Bar, either on the left or right side. The avatar can be an icon from the Lightning Design System library or a custom image by uploading a custom image to the **`Image`** attribute.&#x20;

<figure><img src="/files/kHTtPndD8mIpPwQhxkDJ" alt=""><figcaption><p>Progress Bar with Avatar</p></figcaption></figure>

***

## Adding Interactions

No interactions are available.

***

## **Customizing Your Progress Bar's Look**

The **Styles** panel lets you tailor your progress bar's appearance to match your design. Here's what you can customize:

* **Size:** Adjust the overall size of the progress bar (small, medium, large).
* **Color Variants:**
  * **Base:** The standard color scheme.
  * **Alt Inverse:** High-contrast for dark backgrounds.
  * **Error:** Indicates a problem or failure.
  * **Info:** Neutral color for informational displays.
  * **Inverse:** Light bar on a dark background.
  * **Offline:** Shows when the bar is not actively updating.
  * **Success:** Represents a positive outcome.
  * **Warning:** Indicates caution or potential issues.
* **Specific Elements:**
  * **Value:** Change the style of the numerical value displayed.
  * **Label:** Customize the appearance of any text labels.

### **How to Style Your Progress Bar**

1. Open the **Styles** panel for your progress bar component.
2. Choose the attributes you want to customize.
3. Select your desired colors, fonts, and sizes.

For detailed step-by-step instructions and advanced styling options, refer to our [Styling Guide](/flow/component-builder/style-panel.md).

**Tip:** Experiment with different styles to create a progress bar that visually integrates with the rest of your application

### **How to Apply a Gradient to Your Progress Bar**

The Progress Indicator component lets you customize the appearance of your progress bar using gradients. Here's how:

1. **Locate the 'Completed color' Setting:** Find the "Bar" style section in the Style panel. You'll see the "Completed color" attribute.
2. **Apply Your Gradient:**
   * **Gradient Angle:** Choose the direction of your gradient.
   * **Gradient Colors:** Define the colors you want in your gradient.
   * **Color Positions:** Indicate where each color should start and stop using percentages (%).

**Example:** If you want a gradient that transitions from red (0%) to yellow (50%) to green (100%), you will set those colors at their corresponding percentage positions

<figure><img src="/files/IEFkPh6BWAtg8XPI81u1" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avonnicomponents.com/flow/flow-components/progress-bar.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
