Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Add basic component usage guidelines #322

Merged
merged 49 commits into from
Feb 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
e8d83e3
Add badge and button guidelines without images
daviddossett Jan 20, 2022
121a90a
Add checkbox guidelines
daviddossett Jan 21, 2022
396cbe1
Add divider guidelines
daviddossett Jan 21, 2022
ee5fa6c
Add badge artwork
daviddossett Jan 21, 2022
bc0f7d0
Update badge sections
daviddossett Jan 21, 2022
e306401
Fix image
daviddossett Jan 21, 2022
384ecc0
Update badge image
daviddossett Jan 24, 2022
ec639d8
Add hero assets for all components
daviddossett Jan 24, 2022
730e03e
More guideline updates
daviddossett Jan 26, 2022
5fb7f38
More do/don'ts
daviddossett Jan 26, 2022
b28ae39
Add radio and tag guidance
daviddossett Jan 27, 2022
2828bbc
Add text field guidelines
daviddossett Jan 27, 2022
d7689b3
Polish docs
daviddossett Jan 28, 2022
5d5bee7
Remove unused image
daviddossett Jan 28, 2022
23f438d
Remove unused image
daviddossett Jan 28, 2022
298edde
Update assets structure
daviddossett Feb 1, 2022
17220f3
Fix progress ring corner radius
daviddossett Feb 1, 2022
e76422c
Fix images paths
daviddossett Feb 1, 2022
4d20948
Update button guidelines
daviddossett Feb 1, 2022
a04b0d8
Add link to button guidelines
daviddossett Feb 1, 2022
a73ca89
Grammar fixes
daviddossett Feb 1, 2022
f78dc12
Clarify text field guidelines
daviddossett Feb 1, 2022
6113d09
Grammar
daviddossett Feb 1, 2022
105b5dc
PR feedback
daviddossett Feb 2, 2022
8b2530b
Fix button images resolution
daviddossett Feb 2, 2022
c8dc480
Update badge artwork. Add button artwork
daviddossett Feb 2, 2022
cbfc0ec
Finish button artwork
daviddossett Feb 2, 2022
d3456f2
Add checkbox artwork
daviddossett Feb 2, 2022
c141296
Fix button size in table
daviddossett Feb 2, 2022
61f7cbe
More image res fixes
daviddossett Feb 2, 2022
549d0ac
Add data grid and divider artwork
daviddossett Feb 2, 2022
db7e955
Add dropdown artwork
daviddossett Feb 3, 2022
aa247e2
Add link artwork
daviddossett Feb 3, 2022
37b9910
Add panels guidelines
daviddossett Feb 3, 2022
6b2cfdf
Add progress ring artwork
daviddossett Feb 3, 2022
df9970d
Add radio group artwork
daviddossett Feb 3, 2022
8530132
Add missing alt text to radio image markdown
daviddossett Feb 3, 2022
229995a
Add tag artwork
daviddossett Feb 3, 2022
01c5fa8
Add text area artwork
daviddossett Feb 3, 2022
6c52fda
Add text field artwork
daviddossett Feb 4, 2022
b107aec
Merge branch 'main' into design-guidelines
daviddossett Feb 4, 2022
2e50c94
Fix missing badge artwork and alt text
daviddossett Feb 4, 2022
967a194
Fix badge border radius
daviddossett Feb 4, 2022
adb5cd7
Add icon button example
daviddossett Feb 7, 2022
793d8a0
PR feedback: update checkbox, data grid and dropdown
daviddossett Feb 7, 2022
15e5bf2
More PR feedback
daviddossett Feb 7, 2022
8a47208
Update basic example titles
daviddossett Feb 7, 2022
447da38
Fix panel size
daviddossett Feb 7, 2022
afb33eb
Merge branch 'main' into design-guidelines
daviddossett Feb 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/assets/images/badge-do-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/badge-do-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/badge-do-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/badge-dont-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/badge-dont-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/badge-dont-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/badge-hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-do-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-do-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-do-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-do-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-do-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-dont-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-dont-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-dont-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-dont-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-dont-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-types-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-types-primary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/button-types-secondary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/checkbox-do-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/checkbox-do-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/checkbox-do-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/checkbox-do-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/checkbox-dont-1.png
Binary file added docs/assets/images/checkbox-dont-2.png
Binary file added docs/assets/images/checkbox-dont-3.png
Binary file added docs/assets/images/checkbox-dont-4.png
Binary file added docs/assets/images/checkbox-hero.png
Binary file added docs/assets/images/data-grid-do-1.png
Binary file added docs/assets/images/data-grid-do-2.png
Binary file added docs/assets/images/data-grid-dont-1.png
Binary file added docs/assets/images/data-grid-dont-2.png
Binary file added docs/assets/images/data-grid-hero.png
Binary file added docs/assets/images/divider-do-1.png
Binary file added docs/assets/images/divider-do-2.png
Binary file added docs/assets/images/divider-dont-1.png
Binary file added docs/assets/images/divider-dont-2.png
Binary file added docs/assets/images/divider-hero.png
Binary file added docs/assets/images/dropdown-do-1.png
Binary file added docs/assets/images/dropdown-do-2.png
Binary file added docs/assets/images/dropdown-do-3.png
Binary file added docs/assets/images/dropdown-dont-1.png
Binary file added docs/assets/images/dropdown-dont-2.png
Binary file added docs/assets/images/dropdown-dont-3.png
Binary file added docs/assets/images/dropdown-hero.png
Binary file added docs/assets/images/img-placeholder.png
Binary file added docs/assets/images/link-do-1.png
Binary file added docs/assets/images/link-do-2.png
Binary file added docs/assets/images/link-dont-1.png
Binary file added docs/assets/images/link-dont-2.png
Binary file added docs/assets/images/link-hero.png
Binary file added docs/assets/images/option-hero.png
Binary file added docs/assets/images/panels-do-1.png
Binary file added docs/assets/images/panels-do-2.png
Binary file added docs/assets/images/panels-do-3.png
Binary file added docs/assets/images/panels-dont-1.png
Binary file added docs/assets/images/panels-dont-2.png
Binary file added docs/assets/images/panels-dont-3.png
Binary file added docs/assets/images/panels-hero.png
Binary file added docs/assets/images/progress-ring-do-1.png
Binary file added docs/assets/images/progress-ring-do-2.png
Binary file added docs/assets/images/progress-ring-dont-1.png
Binary file added docs/assets/images/progress-ring-dont-2.png
Binary file added docs/assets/images/progress-ring-hero.png
Binary file added docs/assets/images/radio-do-1.png
Binary file added docs/assets/images/radio-do-2.png
Binary file added docs/assets/images/radio-do-3.png
Binary file added docs/assets/images/radio-dont-1.png
Binary file added docs/assets/images/radio-dont-2.png
Binary file added docs/assets/images/radio-dont-3.png
Binary file added docs/assets/images/radio-group-hero.png
Binary file added docs/assets/images/radio-hero.png
Binary file added docs/assets/images/tag-do-1.png
Binary file added docs/assets/images/tag-dont-1.png
Binary file added docs/assets/images/tag-hero.png
Binary file added docs/assets/images/text-area-do-1.png
Binary file added docs/assets/images/text-area-do-2.png
Binary file added docs/assets/images/text-area-do-3.png
Binary file added docs/assets/images/text-area-dont-1.png
Binary file added docs/assets/images/text-area-dont-2.png
Binary file added docs/assets/images/text-area-dont-3.png
Binary file added docs/assets/images/text-area-hero.png
Binary file added docs/assets/images/text-field-do-1.png
Binary file added docs/assets/images/text-field-do-2.png
Binary file added docs/assets/images/text-field-do-3.png
Binary file added docs/assets/images/text-field-do-4.png
Binary file added docs/assets/images/text-field-dont-1.png
Binary file added docs/assets/images/text-field-dont-2.png
Binary file added docs/assets/images/text-field-dont-3.png
Binary file added docs/assets/images/text-field-dont-4.png
Binary file added docs/assets/images/text-field-hero.png
27 changes: 21 additions & 6 deletions src/badge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,32 @@

The `vscode-badge` component is used to highlight an item, attract attention, and/or flag status.

## Attributes

None
![Badge hero](/docs/assets/images/badge-hero.png)

## Usage

A `vscode-badge` can only contain numbers to follow the conventions of the Visual Studio Code design language.
| ❌ Don't | ✅ Do |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| ![Badge with text value](/docs/assets/images/badge-dont-1.png) | ![Badge with number value](/docs/assets/images/badge-do-1.png) |
| Don't use a badge to display text content. Use a [vscode-tag](../tag/README.md) component instead. | Use a badge to display numbers. |

| ❌ Don't | ✅ Do |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| ![Badge used to display and error](/docs/assets/images/badge-dont-2.png) | ![Badge showing the number of items in a history view](/docs/assets/images/badge-do-2.png) |
| Don't use a badge to indicate an error. | Use badges to indicate the numbered state of an element. |

| ❌ Don't | ✅ Do |
| ----------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| ![Multiple badges on one element](/docs/assets/images/badge-dont-2.png) | ![One badge used for each section in a view](/docs/assets/images/badge-do-3.png) |
| Don't use more than one badge on a single element. | Ensure badges are clearly associated with their parent element. |

If a component that labels an item with a string is desired, see the `vscode-tag` component.
## Implementation

### Attributes

None

### Basic Usage
### Basic Badge

[Interactive Storybook Example](https://microsoft.github.io/vscode-webview-ui-toolkit/?path=/story/library-badge--default)

Expand Down
47 changes: 43 additions & 4 deletions src/button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,48 @@

The `vscode-button` is a web component implementation of a [button element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button). The `vscode-button` also supports several visual appearances––primary, secondary, and icon.

## Attributes
![Button hero](/docs/assets/images/button-hero.png)

## Usage

### Types

| Type | Example | Usage |
| --------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| Primary | <img src="../../docs/assets/images/button-types-primary.png" alt="Primary button" width="100px"/> | Emphasizes the highest priority action in a view. |
| Secondary | <img src="../../docs/assets/images/button-types-secondary.png" alt="Secondary button" width="100px"/> | Used for additional actions in a view that already features a primary action. |
| Icon | <img src="../../docs/assets/images/button-types-icon.png" alt="Icon button" width="50px"/> | A space-efficient style that renders a single icon to represent a specific action. |

### Best Practices

| ❌ Don't | ✅ Do |
| ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
| ![Multiple primary buttons](/docs/assets/images/button-dont-1.png) | ![One primary and multiple secondary buttons](/docs/assets/images/button-do-1.png) |
| Don't use multiple primary buttons in close proximity. | Provide a single primary button with one or more secondary actions |

| ❌ Don't | ✅ Do |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------- |
| ![Buttons with incorrect casing](/docs/assets/images/button-dont-2.png) | ![Buttons with correct casing](/docs/assets/images/button-do-2.png) |
| Don't use fully capitalized or lowercase text. | Use sentence case for all button text. |

| ❌ Don't | ✅ Do |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| ![Button with a vague label](/docs/assets/images/button-dont-3.png) | ![Button with a clear label](/docs/assets/images/button-do-3.png) |
| Don't use vague action text. | Use clear verbs like "Save" or "Cancel" to ensure users feel confident when peforming actions. |

| ❌ Don't | ✅ Do |
| ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| ![Button used as a link](/docs/assets/images//button-dont-4.png) | ![Button clearly associated with the view above](/docs/assets/images//button-do-4.png) |
| Don't use buttons as navigational elements. Use a [vscode-link](../link/README.md) instead. | Use buttons to perform actions relevant to the current view. |

| ❌ Don't | ✅ Do |
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| ![Icon button used for primary action](/docs/assets/images//button-dont-5.png) | ![Icon buttons in a group](/docs/assets/images//button-do-5.png) |
| Don't use an icon button for primary actions. | Use icon buttons for supporting actions in space-constrained layouts. Use icons that convey clear outcomes. |

## Implementation

### Attributes

| Attribute | Type | Description |
| ---------------- | ------- | --------------------------------------------------------------------------------------- |
Expand All @@ -20,9 +61,7 @@ The `vscode-button` is a web component implementation of a [button element](http
| `type` | string | See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attributes). |
| `value` | string | See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attributes). |

## Usage

### Basic Usage
### Basic Button

[Interactive Storybook Example](https://microsoft.github.io/vscode-webview-ui-toolkit/?path=/story/library-button--default)

Expand Down
34 changes: 29 additions & 5 deletions src/checkbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,33 @@

The `vscode-checkbox` is a web component implementation of a [checkbox element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/checkbox).

## Attributes
![Checkbox hero](/docs/assets/images/checkbox-hero.png)

## Usage

| ❌ Don't | ✅ Do |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![Image placeholder](/docs/assets/images/checkbox-dont-1.png) | ![Image placeholder](/docs/assets/images/checkbox-do-1.png) |
| Avoid grouping unrelated checkboxes together. | Split related checkboxes into groups of with descriptive labels. It's ok to group up to three loosely-unrelated checkboxes into one group if using a label that generally captures their purpose. |

| ❌ Don't | ✅ Do |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| ![Image placeholder](/docs/assets/images/checkbox-dont-2.png) | ![Image placeholder](/docs/assets/images/checkbox-do-2.png) |
| Avoid using horizontal checkbox group layouts. | Arrange checkbox groups vertically to make it easy to scan and compare options. |

| ❌ Don't | ✅ Do |
| ------------------------------------------------------------------------------------------ | ----------------------------------------------------------- |
| ![Image placeholder](/docs/assets/images/checkbox-dont-3.png) | ![Image placeholder](/docs/assets/images/checkbox-do-3.png) |
| Don't use an ambiguous label that makes it difficult to understand what the checkbox does. | Use checkbox labels that imply clearly opposite states. |

| ❌ Don't | ✅ Do |
| ------------------------------------------------------------- | ----------------------------------------------------------- |
| ![Image placeholder](/docs/assets/images/checkbox-dont-4.png) | ![Image placeholder](/docs/assets/images/checkbox-do-4.png) |
| Don't use long blocks of text. | Use concise language to describe each option. |

## Implementation

### Attributes

| Attribute | Type | Description |
| ----------- | ------- | ---------------------------------------------------------------------------------------- |
Expand All @@ -13,15 +39,13 @@ The `vscode-checkbox` is a web component implementation of a [checkbox element](
| `required` | boolean | Indicates that the user must check the checkbox before the owning form can be submitted. |
| `value` | string | The string to use as the value of the checkbox when submitting the form |

## Properties
### Properties

| Attribute | Type | Description |
| --------------- | ------- | ------------------------------------------------------------------------- |
| `indeterminate` | boolean | Determines if the element should render the indeterminate checkbox state. |

## Usage

### Basic Usage
### Basic Checkbox

[Interactive Storybook Example](https://microsoft.github.io/vscode-webview-ui-toolkit/?path=/story/library-checkbox--default)

Expand Down
30 changes: 23 additions & 7 deletions src/data-grid/README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,57 @@
# Visual Studio Code Data Grid

The `vscode-data-grid` enables developers to display data in a tabular layout. The data grid is created using three components that work together:
The `vscode-data-grid` enables developers to display data in a tabular layout.

![Data grid hero](/docs/assets/images/data-grid-hero.png)

The data grid is created using three components that work together:

- `<vscode-data-grid>`: The top level container element.
- `<vscode-data-grid-row>`: Displays a single row of data associated with a single record or a header row.
- `<vscode-data-grid-cell>`: Displays a single cell of data within a row.

## Data Grid Attributes
## Usage

| ❌ Don't | ✅ Do |
| ---------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| ![Data grid used as a simple list](/docs/assets/images/data-grid-dont-1.png) | ![Data grid with a large data set](/docs/assets/images/data-grid-do-1.png) |
| Don't use a data grid in place of a basic list. | Use data grids to list complex data with secondary information. |

| ❌ Don't | ✅ Do |
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![Data grid in a VS Code sidebar](/docs/assets/images/data-grid-dont-2.png) | ![Data grid in a VS Code editor panel](/docs/assets/images/data-grid-do-2.png) |
| Avoid data grids in small containers if possible. | Place data grids in a main content area to display as much information as possible in one view. It's ok to use a data grid in a small container if only using 2-3 small columns that don't scroll horizontally. |

## Implementation

### Data Grid Attributes

| Attribute | Type | Description |
| ----------------------- | ------ | -------------------------------------------------------------------------------------- |
| `generate-header` | string | The type of header row that should be generated. Options: `default`, `sticky`, `none`. |
| `grid-template-columns` | string | A string that gets applied to the `grid-template-columns` attribute of child rows. |

## Data Grid Row Attributes
### Data Grid Row Attributes

| Attribute | Type | Description |
| ----------------------- | ------ | -------------------------------------------------------------------- |
| `grid-template-columns` | string | A CSS Grid string that defines the column widths of a data grid row. |
| `row-type` | string | The type of row. Options: `default`, `header`, `sticky-header`. |

## Data Grid Cell Attributes
### Data Grid Cell Attributes

| Attribute | Type | Description |
| ------------- | ------ | ----------------------------------------------------- |
| `cell-type` | string | The type of cell. Options: `default`, `columnheader`. |
| `grid-column` | string | The column index of the cell. |

## Usage

❗️❗️❗️ Important ❗️❗️❗️

An aria-label of "Data Grid" is automatically defined on all data grids so they are technically accessible out of the box. However, a descriptive and meaningful label that fits the use case or context of the data grid should always be defined to replace the default label so those viewing your data grid with a screen reader can better understand the meaning of the data.

For example, if you're using a data grid to display real-time earthquake data, adding an aria-label with the value "Real-Time Earthquakes" would be appropriate.

### Basic Usage
### Basic Data Grid

The recommended basic usage of the `vscode-data-grid` is to use JavaScript (or TypeScript) to programmatically populate the rows and cells of the grid using the `rowsData` property as shown below.

Expand Down
18 changes: 15 additions & 3 deletions src/divider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,27 @@

The `vscode-divider` is a web component implementation of a [horiztonal rule element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr).

![Divider hero](/docs/assets/images/divider-hero.png)

## Usage

| ❌ Don't | ✅ Do |
| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- |
| ![An editor panel divided into pseudo-views](/docs/assets/images/divider-dont-1.png) | ![A form with with multiple sections separated by a divider](/docs/assets/images/divider-do-1.png) |
| 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 |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| ![A form with dividers between each input](/docs/assets/images/divider-dont-2.png) | ![A form with dividers between sections](/docs/assets/images/divider-do-2.png) |
| Don't split up related form elements with a divider. | Use a divider to separate multiple forms on the same page. |

## Attributes

| Attribute | Type | Description |
| --------- | ------ | ---------------------------------------------- |
| role | string | Indicates the semantic meaning of the divider. |

## Usage

### Basic Usage
### Basic Divider

[Interactive Storybook Example](https://microsoft.github.io/vscode-webview-ui-toolkit/?path=/story/library-divider--default)

Expand Down
Loading