--- title: Separator description: "`Separator`は、要素間において区切りを表すコンポーネントです。" links: - style: https://github.com/yamada-ui/yamada-ui/tree/main/packages/react/src/components/separator/separator.style.ts - source: https://github.com/yamada-ui/yamada-ui/tree/main/packages/react/src/components/separator - storybook: https://yamada-ui.github.io/yamada-ui?path=/story/components-separator--horizontal --- ```tsx ``` ## 使い方 ```tsx import { Separator } from "@yamada-ui/react" ``` ```tsx import { Separator } from "@/components/ui" ``` ```tsx import { Separator } from "@workspaces/ui" ``` ```tsx ``` ### バリアントを変更する ```tsx {(variant, index) => } ``` ### サイズを変更する ```tsx {(size, index) => } ``` ### 色を変更する 色を変更する場合は、`borderColor`を設定します。 ```tsx ``` ### 縦方向 ```tsx First Second ``` ### ラベル ```tsx Label Label Label ``` ## Props | Prop | Default | Type | Description | | ------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `size` | `"md"` | `"lg" \| "md" \| "sm" \| "xs"` | The size of the component. | | `variant` | `"solid"` | `"dashed" \| "dotted" \| "solid"` | The variant of the component. | | `orientation` | `"horizontal"` | `"horizontal" \| "vertical"` | The orientation of the divider. |