Canopy Separator — Best Practices
This skill provides usage guidance, dos and don'ts, and input reference for the Canopy lg-separator component from @legal-and-general/canopy.
Apply this skill whenever you use LgSeparatorComponent or lg-separator.
Import
import { LgSeparatorComponent } from '@legal-and-general/canopy';
Basic Usage
<lg-separator></lg-separator>
With a dotted style:
<lg-separator variant="dotted"></lg-separator>
With a semantic separator role for accessibility:
<lg-separator [hasRole]="true"></lg-separator>
Inputs
| Input | Type | Default | Description |
|-------|------|---------|-------------|
| variant | 'solid' \| 'dotted' | 'solid' | Visual style of the separator. |
| hasRole | boolean | false | When true, adds role="separator" to the element. |
Dos and Don'ts
Do
- Do use a separator to group related items, such as within a list.
- Do use a separator to divide content into clear, manageable sections.
Design Constraints
- The separator can be positioned at full or partial width.
- This component is pending brand modernisation.