Button Group

Overview

Button Groups organize multiple buttons into a single unit, presenting them in a neatly arranged horizontal series. This grouping includes various button styles, such as basic buttons, icon-based buttons, and other design variations.

Buttons are essential interactive elements in the user interface, designed to trigger specific actions when clicked by the user. They facilitate various functions, such as submitting forms, navigating between pages, or executing commands.

For example, in a Salesforce custom application for managing customer support tickets, you might use a Button Group on the ticket detail page to streamline common actions. This Button Group could include custom buttons like Assign to Me , Escalate and Add Comment.

  • Assign to Me: Allows a support agent to quickly take ownership of the ticket.

  • Escalate: Moves the ticket to a higher priority or another support level.

  • Add Comment: Lets the agent add notes or updates to the ticket.

image-20240816-113513.png
Button Group

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-150622.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.

Actions

  • You can include multiple actions, each displayed as a button. Clicking a button initiates a specific action or workflow.

  • You have the option to add multiple actions. To create a new action, simply click on the + icon.

Note: After creating the action, it will be displayed on the canvas.

Alignment

Here, you can adjust the button alignment.

  • Left Alignment: The buttons will be aligned to the left side of the section where they are placed.

  • Center Alignment: The buttons will be aligned to center of the section.

  • Right Alignment: The buttons will be aligned to the right side of the section.

Base UI:

Attribute Name

Description

Attribute Name

Description

Margin Location

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

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.

Classes

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

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.

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 attribute.

Button Action:

Attributes

Description

Attributes

Description

Label

A Label is the name shown to users and can come from various sources.

Name

Enter a unique the name for your action.

Icon

This option lets you choose from various icons to add to the action button.

Variant

This feature allows users to change the appearance of the action button.

  1. Neutral

  2. Brand

  3. Outline Brand

  4. Success

  5. Destructive

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 attribute

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 attribute.

Label Source Type:

Attribute

Description

Attribute

Description

Model

From this source, users can select a Model field to be displayed as the label name.

Variable

Here, users can select the label name from variables such as Record ID, Is Disabled, Is Read only, or Is Visible.

Cookie Key

Choose the available cookie key whose value you want to include from your browser.

Local Storage Key

Select the available Local Storage Key whose value you want to include from your browser.

User

Here, you can choose the label from user fields such as First Name, Last Name, Email, Name, Phone, or Session ID.

Merge Field Expression

Merge Field Expression displays the value selected from the chosen value source.

Message Body

Inside the message body, user also can add the values manually.

Events