Section

Overview

The Avonni Section component creates expandable sections to organize content in your Salesforce Dynamic Components. It includes a slot for adding other Avonni components inside, making it ideal for grouping related elements like forms, lists, or data displays.

Key features

  • Expandable Design: Toggle visibility of content for better UX in dense interfaces.

  • Customization: Variants for styling, avatars for visual cues, and icons for collapsibility.

  • Interactivity: Support for actions, progress indicators, and tags.

  • Slot Integration: Embed other components (e.g., Text Areas, Sliders) within the section's content area.

Tip

Use Cases

  • Group form fields in expandable panels (e.g., "Contact Details" section).

  • Organize dashboard widgets, collapsing less-used ones.

  • Display collapsible help content or FAQs.

  • Structure reports with tagged, progress-tracked sections.

  • Build nested UIs, like a section containing a Data Table for filtered views.

Configuration

Select the Section on the canvas to access properties in the right-hand Properties Panel.

Basic Properties

These handle identification and core labeling.

Property
Type
Description
Example

API Name

Text

Unique identifier for the instance.

ContactDetailsSection

Title

Text

Main heading for the section.

"Contact Information"

Caption

Text (Optional)

Subtext or description below the title.

"Enter user details here."

Content and Slot

This is the expandable area where you drag and drop other Avonni components (e.g., inputs, tables). No direct property—configure via canvas placement.

Best Practice: Keep slotted content related and concise to maintain performance when expanding/collapsing.

Appearance & Variant

These control the visual style.

Property
Type
Description
Options/Examples

Variant

Select

Base style: base (default, clean) or shaded (with background shading).

base, shaded.

Collapsibility

These manage the expand/collapse behavior.

Property
Type
Description

Collapsible

Boolean

Enables toggling; if off, section is always open.

Closed

Boolean

Initial state: On = collapsed, Off = expanded (active if Collapsible is on).

Collapsible Icon (Active if Collapsible is On)

Customize the toggle icon.

Sub-Property
Type
Description
Options/Examples

Hide

Boolean

Hides the icon entirely.

-

Open Icon Name

Text

Icon when expanded (e.g., Salesforce Lightning Design System names).

utility:chevronup

Close Icon Name

Text

Icon when collapsed.

utility:chevrondown

Position

Select

Icon location relative to title.

left, right.

Tip: Use standard SLDS icons for consistency. (Placeholder for screenshot: Section with custom icon.)

Avatar

Add a visual element before the title.

Property
Type
Description
Options/Examples

Variant

Select

Shape: circle (rounded) or square.

circle, square.

Initials

Text (Optional)

Text overlay (e.g., user initials).

"JD"

Icon Name

Text (Optional)

Icon instead of image/initials.

standard:user

Icon Size

Select

Size of icon or avatar.

x-small, small, medium, large, x-large, xx-large.

Image

Text/URL (Optional)

URL or map for an image.

Note: Prioritize one: image, icon, or initials.

Actions

Configure buttons on the right side that trigger interactions (set up in the Interactions Panel). Examples: "Edit", "Delete".

Best Practise

Progress and Tags

These add indicators and metadata.

Property
Type
Description
Example

Progress

Number

Value for a progress bar (0-100); displays completion status. Can be set manually or bound to a Number Variable for dynamic updates based on calculations or data.

75 (or mapped to {!completionPercent})

Tags

List/Text

Comma-separated or array of tags for categorization/searchability.

"Priority", "Review"

Tip

Example

Collapsible Contact Form Section

1

Add Section Component

  • API Name: ContactFormSection

  • Title: "Contact Details"

  • Caption: "Fill in user information"

  • Variant: shaded

  • Collapsible: On

  • Closed: On (starts collapsed)

  • Collapsible Icon: Open Icon Name = utility:chevronup, Close Icon Name = utility:chevrondown, Position = left

2

Add Avatar

  • Variant: circle

  • Icon Name: standard:contact

  • Icon Size: medium

3

Configure Actions

First, create a Record Variable in Resources for the desired object (e.g., Contact) to hold form data. Then, in the Interactions Panel, add a "Save" button that triggers a record update action (e.g., Update Record), binding it to the Record Variable.

4

Add Progress and Tags

Progress = 50, Tags = "Form", "Required"

5

Slot Content

To populate the section with form fields linked to your Contact record, base it on the Record Variable created earlier (e.g., for the Contact object).

Steps:

  1. Select the Section component on the canvas.

  2. In the Elements Panel (typically left or right side), switch to the Fields tab—this displays available fields from the bound Record Variable.

  3. Drag relevant fields (e.g., Name, Email) directly into the section's slot on the canvas.

Result: A shaded, collapsible section with avatar, progress bar, tags, and actions—expands to reveal form fields.

Key Considerations

  • Collapsibility Logic: Test initial Closed state; bind to variables for dynamic toggling.

  • Slot Performance: Avoid overloading slots with heavy components to prevent lag on expand.

  • Avatar Prioritization: Use an image for photos, an icon for generics, and initials for personalization—only one displays.

  • Actions Integration: Ensure interactions are defined in the panel; test firing on click.

  • Progress Visualization: Style matches variant; use for task tracking within sections.

  • Accessibility: Provide alt text for images/icons; ensure keyboard-navigable collapse.

Troubleshooting Common Issues

  • Section Won't Collapse: Verify Collapsible is on; check for conflicting behaviors.

  • Icon Not Showing: If Hide is on, toggle off; confirm icon names are valid SLDS.

  • Actions Not Triggering: Double-check Interactions Panel setup and bindings.

  • Progress Not Visible: Ensure value is 0-100; may require variant adjustment.

  • Tags Overlap: Limit tag count; style via custom CSS if needed.

  • Slot Content Missing: Drag components directly into the slot on canvas.

Summary

The Avonni Section component organizes UIs with expandable, customizable panels and slots for nested components. It's perfect for modular, interactive designs in Salesforce. For related components, see Avonni Accordion or Interactions Guide.

Last updated

Was this helpful?