Separator
A thin line between groups. Horizontal by default, vertical inside rows.
Magnificent Four
4 tokens, rebalanced weekly.
Magnificent Four
4 tokens, rebalanced weekly.
Magnificent Four
4 tokens, rebalanced weekly.
import { Separator } from "@/components/ui/separator";
export default function Demo() { return ( <div className="w-72"> <div className="space-y-1"> <h4 className="text-sm font-medium">Magnificent Four</h4> <p className="text-[13px] text-muted-foreground"> 4 tokens, rebalanced weekly. </p> </div> <Separator className="my-4" /> <div className="flex h-5 items-center gap-4 text-sm"> <span>Overview</span> <Separator orientation="vertical" /> <span>Holdings</span> <Separator orientation="vertical" /> <span>Holders</span> </div> </div> );}<script setup lang="ts">import { Separator } from "@/components/ui/separator";</script>
<template> <div class="w-72"> <div class="space-y-1"> <h4 class="text-sm font-medium">Magnificent Four</h4> <p class="text-[13px] text-muted-foreground">4 tokens, rebalanced weekly.</p> </div> <Separator class="my-4" /> <div class="flex h-5 items-center gap-4 text-sm"> <span>Overview</span> <Separator orientation="vertical" /> <span>Holdings</span> <Separator orientation="vertical" /> <span>Holders</span> </div> </div></template><script lang="ts"> import { Separator } from "$lib/components/ui/separator";</script>
<div class="w-72"> <div class="space-y-1"> <h4 class="text-sm font-medium">Magnificent Four</h4> <p class="text-[13px] text-muted-foreground">4 tokens, rebalanced weekly.</p> </div> <Separator class="my-4" /> <div class="flex h-5 items-center gap-4 text-sm"> <span>Overview</span> <Separator orientation="vertical" /> <span>Holdings</span> <Separator orientation="vertical" /> <span>Holders</span> </div></div>Installation
Section titled “Installation”npx shadcn@latest add @edmi-ui/separatorpnpm dlx shadcn@latest add @edmi-ui/separatoryarn dlx shadcn@latest add @edmi-ui/separatorbunx shadcn@latest add @edmi-ui/separatorPick your package manager above; the choice is remembered. Add the @edmi-ui registry first, see Getting started.
Install the dependencies:
Terminal window npm install @base-ui/reactTerminal window pnpm add @base-ui/reactTerminal window yarn add @base-ui/reactTerminal window bun add @base-ui/reactCopy the code from Component source into your project and update the import paths to match your aliases.
npx shadcn-vue@latest add @edmi-ui/separatorpnpm dlx shadcn-vue@latest add @edmi-ui/separatoryarn dlx shadcn-vue@latest add @edmi-ui/separatorbunx shadcn-vue@latest add @edmi-ui/separatorPick your package manager above; the choice is remembered. Add the @edmi-ui registry first, see Getting started.
Install the dependencies:
Terminal window npm install reka-ui @vueuse/coreTerminal window pnpm add reka-ui @vueuse/coreTerminal window yarn add reka-ui @vueuse/coreTerminal window bun add reka-ui @vueuse/coreCopy the code from Component source into your project and update the import paths to match your aliases.
npx shadcn-svelte@latest add https://viandwi24.github.io/edmi-ui/r/svelte/separator.jsonpnpm dlx shadcn-svelte@latest add https://viandwi24.github.io/edmi-ui/r/svelte/separator.jsonyarn dlx shadcn-svelte@latest add https://viandwi24.github.io/edmi-ui/r/svelte/separator.jsonbunx --bun shadcn-svelte@latest add https://viandwi24.github.io/edmi-ui/r/svelte/separator.jsonPick your package manager above; the choice is remembered. Add the @edmi-ui registry first, see Getting started.
Copy the code from Component source into your project and update the import paths to match your aliases.
import { Separator } from "@/components/ui/separator";
<div className="w-72"> <div className="space-y-1"> <h4 className="text-sm font-medium">Magnificent Four</h4> <p className="text-[13px] text-muted-foreground"> 4 tokens, rebalanced weekly. </p> </div> <Separator className="my-4" /> <div className="flex h-5 items-center gap-4 text-sm"> <span>Overview</span> <Separator orientation="vertical" /> <span>Holdings</span> <Separator orientation="vertical" /> <span>Holders</span> </div></div><script setup lang="ts">import { Separator } from "@/components/ui/separator";</script>
<template> <div class="w-72"> <div class="space-y-1"> <h4 class="text-sm font-medium">Magnificent Four</h4> <p class="text-[13px] text-muted-foreground">4 tokens, rebalanced weekly.</p> </div> <Separator class="my-4" /> <div class="flex h-5 items-center gap-4 text-sm"> <span>Overview</span> <Separator orientation="vertical" /> <span>Holdings</span> <Separator orientation="vertical" /> <span>Holders</span> </div> </div></template><script lang="ts"> import { Separator } from "$lib/components/ui/separator";</script>
<div class="w-72"> <div class="space-y-1"> <h4 class="text-sm font-medium">Magnificent Four</h4> <p class="text-[13px] text-muted-foreground">4 tokens, rebalanced weekly.</p> </div> <Separator class="my-4" /> <div class="flex h-5 items-center gap-4 text-sm"> <span>Overview</span> <Separator orientation="vertical" /> <span>Holdings</span> <Separator orientation="vertical" /> <span>Holders</span> </div></div>Component source
Section titled “Component source”import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";import { cn } from "cn";
function Separator({ className, orientation = "horizontal", ...props}: SeparatorPrimitive.Props) { return ( <SeparatorPrimitive data-slot="separator" orientation={orientation} className={cn( "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch", className, )} {...props} /> );}
export { Separator };<script setup lang="ts">import type { SeparatorProps } from 'reka-ui'import type { HTMLAttributes } from 'vue'import { reactiveOmit } from '@vueuse/core'import { Separator } from 'reka-ui'import { cn } from '@/registry/edmi/lib/utils'
const props = withDefaults(defineProps< SeparatorProps & { class?: HTMLAttributes['class'] }>(), { orientation: 'horizontal', decorative: true,})
const delegatedProps = reactiveOmit(props, 'class')</script>
<template> <Separator data-slot="separator" v-bind="delegatedProps" :class="cn('shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch', props.class)" /></template>export { default as Separator } from "./Separator.vue";<script lang="ts"> import { Separator as SeparatorPrimitive } from "bits-ui"; import { cn } from "$lib/utils.js";
let { ref = $bindable(null), class: className, "data-slot": dataSlot = "separator", ...restProps }: SeparatorPrimitive.RootProps = $props();</script>
<SeparatorPrimitive.Root bind:ref data-slot={dataSlot} class={cn( "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch", className )} {...restProps}/>import Root from "./separator.svelte";
export { Root, // Root as Separator,};| Prop | Type | Default |
|---|---|---|
orientation |
horizontal | vertical |
horizontal |
✦ Edmi additions
Section titled “✦ Edmi additions”- Uses
--border; Base UIdata-orientationselectors instead of Radixdecorative.