diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ceea18..26754f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Added + +- Added vertical separators: `
` renders as a 1px line that fills its row. + ### Fixed - Prevented Escape from dismissing an enclosing dialog while closing an open Combobox popup. diff --git a/site/src/docs/components/separator.mdx b/site/src/docs/components/separator.mdx index 1183a97..5277b99 100644 --- a/site/src/docs/components/separator.mdx +++ b/site/src/docs/components/separator.mdx @@ -27,24 +27,30 @@ Import Tailwind and one full Basecoat style bundle. @import "basecoat-css/vega.css"; ``` -Or import only the base CSS, which sets the border color. +Or import only the base CSS, which styles horizontal and vertical separators. ```css @import "tailwindcss"; @import "basecoat-css/base.css"; ``` -Separator is a native `
` plus Tailwind utilities and has no dedicated component CSS file. +Separator is a native `
` and has no dedicated component CSS file. Using CDN or bundler imports? See the [Installation page](/installation). -Use an `
`. Tailwind's preflight and Basecoat's base CSS render it as a 1px line in the `border` color, matching shadcn/ui's Separator. +Use an `
` with `role="separator"`. It renders as a 1px line in the `border` color, matching shadcn/ui's Separator. ```html
+``` + +If the separator is purely decorative, use `role="none"` instead so assistive technologies skip it. This is what shadcn/ui's `decorative` prop does. + +```html +
```
@@ -54,14 +60,14 @@ Use an `
`. Tailwind's preflight and Basecoat's base CSS render it as a 1px l ### Vertical -Add `aria-orientation="vertical"` and swap the top border for an inline-start border. `self-stretch` makes it fill the height of a flex row. +Add `aria-orientation="vertical"` for a vertical separator. It fills the height of its row.
Blog
- +
Docs
- +
Source
@@ -76,12 +82,12 @@ Vertical separators between menu items with descriptions. Settings Manage preferences - +
Account Profile & security
- +