구분선(Separator)
콘텐츠를 시각적 또는 의미적으로 구분해주는 컴포넌트예요.
출처: 문서
본문
Import
import { Separator } from "@kobalte/core/separator";
// or
import { Root } from "@kobalte/core/separator";
// or (deprecated)
import { Separator } from "@kobalte/core";
Features
- 네이티브 HTML
<hr>요소를 지원해요. - WAI ARIA Separator role을 통한 커스텀 요소 타입을 지원해요.
- 가로 및 세로 방향을 모두 지원해요.
Anatomy
구분선은 다음 요소로 구성돼요:
- Separator: 구분선의 루트 컨테이너예요.
<Separator />
Example
API Reference
Separator
Separator은 @kobalte/core/separator의 Root import와 동일해요(그리고 폐기(deprecated)된 Separator.Root).
| Prop | Description |
|---|---|
| orientation | 'horizontal' | 'vertical' The orientation of the separator. |
| Data attribute | Description |
|---|---|
| data-orientation='horizontal' | Present when the separator has horizontal orientation. |
| data-orientation='vertical' | Present when the separator has vertical orientation. |
Rendered elements
| Component | Default rendered element |
|---|---|
Separator |
hr |