Introduction
The Connector component is a versatile utility that helps display connecting lines in nested tree views. It provides visual cues that help users understand the hierarchical relationships between items in tree structures.
Notable features:
- Four connector types for different tree positions
- Right-to-left (RTL) layout support
- Clean, minimal visual design
- Integration with Tree and NestedList components
- Customizable styling with CSS
- Accessible visual hierarchy indication
Connector Types Demo
Here's a demonstration of all four connector types and their RTL variants:
Connector Types
The Connector component has four types of connectors, which can be used according to the specific requirements of your tree view:
Primary Types
- last: Use for the last item in a branch
- child: Use for an item that has at least one child
Secondary Types
- sibling: Use for an item that has a sibling below it
- empty: Use for empty space in the tree view
Basic connector usage:
RTL Support
The Connector component also supports right-to-left (RTL) layouts, which can be enabled by setting the `rtl` prop to `true`. This is useful for applications that need to support RTL languages.
RTL Use Cases
- Arabic, Hebrew, and other RTL language interfaces
- Internationalized applications
- Custom layout requirements
- Mirrored tree structures
Integration with Tree Components
The Connector component is primarily used internally by Tree and NestedList components to create visual hierarchies. However, it can also be used standalone for custom tree implementations.
Used By
- Tree: Hierarchical data display
- NestedList: Nested navigation lists
- Accordion: Nested accordion structures
Custom Usage
- File system browsers
- Organization charts
- Decision trees
- Category hierarchies
Styling and Customization
Connectors use minimal SVG-based graphics that can be styled with CSS. The default styling provides clean, professional-looking connection lines that integrate well with most design systems.
Customization Options
- Color: Adjust line colors to match your theme
- Thickness: Modify line weight for different visual emphasis
- Style: Change from solid to dashed or dotted lines
- Size: Scale connectors for different tree densities
Ready for more?
Now that you understand how Connector works, explore the Tree and NestedList components that use it, or learn about other utility components.
Tree → ValidationReport →