separator

Visually or semantically separates content.

PreviousNext
Zard/ui
The Next Level for Your Angular Projects
A set of beautifully designed components that you can customize, extend, and build on.
import { Component } from '@angular/core';

import { ZardSeparatorComponent } from '../separator.component';

@Component({
  selector: 'z-demo-separator-preview',
  imports: [ZardSeparatorComponent],
  standalone: true,
  template: `
    <div class="flex max-w-sm flex-col gap-4 text-sm">
      <div class="flex flex-col gap-1.5">
        <div class="leading-none font-medium">Zard/ui</div>
        <div class="text-muted-foreground">The Next Level for Your Angular Projects</div>
      </div>
      <z-separator />
      <div>A set of beautifully designed components that you can customize, extend, and build on.</div>
    </div>
  `,
})
export class ZardDemoSeparatorPreviewComponent {}

Installation

Copy
npx zard-cli@latest add separator

Usage

import { ZardSeparatorComponent } from '@/shared/components/separator/separator.component';
Copy
<z-separator></z-separator>
Copy

Examples

vertical

Blog
Docs
Source
import { Component } from '@angular/core';

import { ZardSeparatorComponent } from '../separator.component';

@Component({
  selector: 'z-demo-separator-vertical',
  imports: [ZardSeparatorComponent],
  standalone: true,
  template: `
    <div class="flex h-5 items-center gap-4 text-sm">
      <div>Blog</div>
      <z-separator zOrientation="vertical" />
      <div>Docs</div>
      <z-separator zOrientation="vertical" />
      <div>Source</div>
    </div>
  `,
})
export class ZardDemoSeparatorVerticalComponent {}

menu

SettingsManage preferences
AccountProfile & security
import { Component } from '@angular/core';

import { ZardSeparatorComponent } from '../separator.component';

@Component({
  selector: 'z-demo-separator-menu',
  imports: [ZardSeparatorComponent],
  standalone: true,
  template: `
    <div class="flex items-center gap-2 text-sm md:gap-4">
      <div class="flex flex-col gap-1">
        <span class="font-medium">Settings</span>
        <span class="text-muted-foreground text-xs">Manage preferences</span>
      </div>
      <z-separator zOrientation="vertical" />
      <div class="flex flex-col gap-1">
        <span class="font-medium">Account</span>
        <span class="text-muted-foreground text-xs">Profile & security</span>
      </div>
      <z-separator zOrientation="vertical" class="hidden md:block" />
      <div class="hidden flex-col gap-1 md:flex">
        <span class="font-medium">Help</span>
        <span class="text-muted-foreground text-xs">Support & docs</span>
      </div>
    </div>
  `,
})
export class ZardDemoSeparatorMenuComponent {}

list

Item 1
Value 1
Item 2
Value 2
Item 3
Value 3
import { Component } from '@angular/core';

import { ZardSeparatorComponent } from '../separator.component';

@Component({
  selector: 'z-demo-separator-list',
  imports: [ZardSeparatorComponent],
  standalone: true,
  template: `
    <div class="flex w-full min-w-sm flex-col gap-2 text-sm">
      <dl class="flex items-center justify-between">
        <dt>Item 1</dt>
        <dd class="text-muted-foreground">Value 1</dd>
      </dl>
      <z-separator />
      <dl class="flex items-center justify-between">
        <dt>Item 2</dt>
        <dd class="text-muted-foreground">Value 2</dd>
      </dl>
      <z-separator />
      <dl class="flex items-center justify-between">
        <dt>Item 3</dt>
        <dd class="text-muted-foreground">Value 3</dd>
      </dl>
    </div>
  `,
})
export class ZardDemoSeparatorListComponent {}

API Reference

z-separatorComponent

Visually or semantically separates content with a horizontal or vertical line.

PropertyDescriptionTypeDefault
[zOrientation] The orientation of the separator. "horizontal" | "vertical" horizontal
[zDecorative] When true, indicates that the separator is purely decorative and removes it from the accessibility tree. boolean true
[class] Override or extend the default classes (margin, color, etc). ClassValue -
github iconwhatsapp icondiscord iconX icon

Made with in Brazil. Open source and available on GitHub .