Separator
separatoruiHorizontal or vertical visual divider — a `<div>` with the right ARIA role and a registry-token border color. Use between sections, list rows, and toolbar groups.
Installation
$pnpm dlx shadcn-svelte@latest add https://uipkge.dev/r/svelte/separator.json$npx shadcn-svelte@latest add https://uipkge.dev/r/svelte/separator.json$yarn dlx shadcn-svelte@latest add https://uipkge.dev/r/svelte/separator.json$bunx shadcn-svelte@latest add https://uipkge.dev/r/svelte/separator.jsonManifest:
https://uipkge.dev/r/svelte/separator.jsonInstalls to:src/lib/components/ui/separator/Examples
Loading interactive previews…
Loading interactive previews…
Props
| Name | Type / Values | Default | Required |
|---|---|---|---|
orientation | 'horizontal' | 'vertical' | horizontal | optional |
decorativePresentational only: hides from assistive tech. Set false for a semantic landmark. | boolean | true | optional |
ref | HTMLDivElement | null | — | optional |
Used by
auth-sign-inauth-sign-upcart-drawercheckout-flowcoming-sooncontact-01cookie-consent-barcta-final-banddashboard-layoutdata-tableevent-calendar-dashboardfeature-alternating-rowsfeatures-01footerfooter-01headerheader-mega-menulogin-01login-02logo-cloud-grayscalelogosnewsletterorder-confirmationpricingpricing-01pricing-matrix-plan-cardsproduct-detail-pageproduct-grid-pagerecord-detail-pageregister-01rich-text-editorsettings-pagesidebartestimonialuser-profile-page
Files installed (2)
src/lib/components/ui/separator/Separator.svelte1 kB
<script lang="ts" module> import type { HTMLAttributes } from 'svelte/elements' export interface SeparatorProps extends HTMLAttributes<HTMLDivElement> { orientation?: 'horizontal' | 'vertical' /** Presentational only: hides from assistive tech. Set false for a semantic landmark. */ decorative?: boolean ref?: HTMLDivElement | null } </script> <script lang="ts"> import { cn } from '$lib/utils' let { class: className, orientation = 'horizontal', decorative = true, ref = $bindable(null), ...restProps }: SeparatorProps = $props() </script> <div bind:this={ref} data-uipkge="" data-slot="separator" data-orientation={orientation} role={decorative ? undefined : 'separator'} aria-orientation={decorative ? undefined : orientation} aria-hidden={decorative ? 'true' : undefined} class={cn( 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px', className, )} {...restProps} ></div>src/lib/components/ui/separator/index.ts0.1 kB
export { default as Separator, type SeparatorProps } from './Separator.svelte'
Raw manifest:https://uipkge.dev/r/svelte/separator.json