SPFx PropertyPaneHorizontalRule: Organizing the Property Pane with Visual Separators

Introduction

As Web Parts become more sophisticated, their Property Panes often contain many configuration options.

Without proper organization, users can quickly become overwhelmed by long lists of settings.

The SharePoint Framework provides a very simple control to solve this problem:

PropertyPaneHorizontalRule.

Although this control does not collect information or execute actions, it plays an important role in improving the overall user experience by visually separating sections of the Property Pane.


What is PropertyPaneHorizontalRule?

PropertyPaneHorizontalRule displays a horizontal divider inside the Property Pane.

Its only purpose is to improve readability.

It does not:

  • store values;
  • execute code;
  • communicate with React;
  • modify this.properties.

It simply creates a visual separation between groups of controls.


Why Use a Horizontal Rule?

Imagine a Property Pane containing many settings.

Without separators:

General Settings
Title
Description
Show Header
Enable Search
Maximum Items
Theme
Color
Documentation

Everything appears as one large block.

Now imagine the same Property Pane with separators.

General Settings
Title
Description
────────────────────────
Display Settings
Show Header
Theme
Color
────────────────────────
Advanced Settings
Maximum Items
────────────────────────
Documentation

The configuration immediately becomes easier to understand.


Creating the Horizontal Rule

The implementation is extremely simple.

PropertyPaneHorizontalRule()

Unlike every previous control, there are no parameters.

No identifier.

No configuration object.

No properties.

The control simply renders a separator.


Complete Example

protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
return {
pages: [
{
header: {
description: strings.PropertyPaneDescription
},
groups: [
{
groupName: strings.BasicGroupName,
groupFields: [
PropertyPaneLabel('general', {
text: 'General Settings'
}),
PropertyPaneHorizontalRule(),
PropertyPaneLabel('display', {
text: 'Display Settings'
})
]
}
]
}
]
};
}

The Property Pane now contains a clean visual separation between sections.


Why Doesn’t It Need a Property?

Unlike configuration controls, the Horizontal Rule has no associated value.

There is no:

this.properties.horizontalRule

There is also no reason to create a React property.

For this reason, both interfaces remain empty.

Web Part:

export interface IPropertyPaneHorizontalRuleWebPartProps {
}

React Component:

export interface IPropertyPaneHorizontalRuleWpProps {
}

Property Flow

Unlike TextField or Slider, there is no property flow.

Property Pane
Horizontal Rule
Visual separator

Nothing is stored.

Nothing is rendered by React.

The control exists only inside the Property Pane.


When Should You Use It?

A Horizontal Rule is recommended whenever the Property Pane contains multiple logical sections.

Typical examples include:

  • General Settings
  • Display Settings
  • Search Settings
  • Security
  • Advanced Options
  • Documentation
  • About

Separating these sections makes configuration much easier for end users.


Combining with Other Controls

The Horizontal Rule is most effective when used together with other informational controls.

Example:

General Settings
Title
Description
────────────────────────
Display Settings
Show Header
Theme
Color
────────────────────────
Need Help?
Open Microsoft Learn

This creates a Property Pane that feels organized and professional.


HorizontalRule vs Label

These two controls complement each other.

PropertyPaneLabelPropertyPaneHorizontalRule
Displays textDisplays a separator
Explains a sectionSeparates sections
InformationalVisual organization

Most real-world Property Panes use both together.


Best Practices

Use Horizontal Rules to:

  • Separate logical groups.
  • Improve readability.
  • Reduce visual clutter.
  • Organize long Property Panes.

Avoid inserting too many separators, as excessive divisions can have the opposite effect and make the interface feel fragmented.


Classification of Native Property Pane Controls

After completing this example, we have explored the major native Property Pane controls.

Configuration Controls

These controls store values.

  • PropertyPaneTextField
  • PropertyPaneCheckbox
  • PropertyPaneToggle
  • PropertyPaneDropdown
  • PropertyPaneChoiceGroup
  • PropertyPaneSlider

Command Controls

These controls execute actions.

  • PropertyPaneButton

Informational Controls

These controls provide guidance.

  • PropertyPaneLabel
  • PropertyPaneLink

Layout Controls

These controls organize the Property Pane.

  • PropertyPaneHorizontalRule

Together, these categories form the foundation of every well-designed SharePoint Framework Property Pane.


Conclusion

PropertyPaneHorizontalRule is one of the simplest native controls available in SharePoint Framework.

Although it has no properties and performs no logic, it plays an important role in improving the organization and readability of large Property Panes.

As your Web Parts grow in complexity, small layout improvements such as Labels and Horizontal Rules can make a significant difference to the user experience.

With this article, we have completed the study of the core native Property Pane controls.

The next step is to build a Native Property Pane Showcase, combining everything we have learned into a single, well-organized Web Part before moving on to the advanced Property Controls provided by the PnP library.


References

SharePoint Framework Overview

Integrate with the Property Pane

PropertyPaneHorizontalRule API

React Documentation

Edvaldo Guimrães Filho Avatar

Published by