--- layout: '@/layouts/Doc.astro' title: Separator --- import Example from '@/components/Example.astro' import separatorStyle from '@webtui/css/components/separator.css?raw' import boxStyle from '@webtui/css/utils/box.css?raw' A horizontal or vertical separator The quick brown fox obliterates

the lazy dog

`} /> ## Import ```css @import '@webtui/css/components/separator.css'; ``` ## Usage ```html
``` If `direction-` is not specified, separators are horizontal by default. ## Examples ### Vertical The lazy brown
dog licks

the yucky
fox

`} /> ### Caps Use the `cap-` attribute to control how the ends of the separator behave #### Bisecting Caps `cap-="bisect"` extends the edges of the separator by `0.5ch` making it ideal to use alongside the `box-` utility

Default

Separator

Bisecting

Separator

Default

Separator

Bisecting

Separator

`} /> #### Edge Caps `cap-="edge"` clips off the edges of the separator by `0.5ch` making it ideal for corners bisect
edge
bisect
default
bisect
bisect
`} /> #### Start and End Caps You can specify two values for the `cap-` attribute to control the start and end of the separator ```html
```
edge bisect
default edge
bisect default
`} /> ## Reference ### Properties Use the following custom CSS properties to style separators - `--separator-width`: The width of the separator line - `--separator-color`: The color of the separator line - `--separator-background`: The background color of the separator behind the line The quick green dog

eats the lazy fox

`} /> ### Extending To extend the Separator stylesheet, define a CSS rule on the `components` layer ```css @layer components { input[type='checkbox'] { /* ... */ } } ``` ### Scope - All elements with the `is-~="separator"` selector ```css input[type='checkbox'] { /* ... */ } ```