Visual Studio Code Divider
March 21, 2023 · View on GitHub
The vscode-divider is a web component implementation of a horizontal rule element.

Usage
| ❌ Don't | ✅ Do |
|---|---|
![]() | ![]() |
| Don't use a divider to create pseudo-views within a webview. | Use dividers to create distinct sections of related content in a single view. |
| ❌ Don't | ✅ Do |
|---|---|
![]() | ![]() |
| Don't split up related form elements with a divider. | Use a divider to separate multiple forms on the same page. |
Implementation
Interactive component examples
Attributes
| Attribute | Type | Description |
|---|---|---|
| role | string | Indicates the semantic meaning of the divider. |
Basic Divider
<vscode-divider></vscode-divider>
Role Attribute
The role attribute determines the semantic meaning (or lack there of) of a Visual Studio Code Divider. The two options are separator and presentation.
The separator option is the default value and indicates that the divider semantically separates content.
The presentation option indicates that the divider has no semantic value and is for visual presentation only.
<!-- Indicates that the divider semantically separates content -->
<vscode-divider role="separator"></vscode-divider>
<!-- Indicates that the divider has no semantic value and is for visual presentation only -->
<vscode-divider role="presentation"></vscode-divider>



