import { Component } from '@angular/core'; import { CommonModule } from '@angular/common'; import { SpacerComponent } from '../../../../../ui-essentials/src/lib/components/layout'; @Component({ selector: 'ui-spacer-demo', standalone: true, imports: [CommonModule, SpacerComponent], template: `

Spacer Demo

Size Variants

Spacers with debug mode enabled to show spacing

@for (size of sizes; track size) {
{{ size }}
A
B
}

Directional Spacing

Horizontal Spacing

Left
Right

Vertical Spacing

Top
Bottom

Component Spacing Variants

Semantic spacing tokens for different component contexts

@for (variant of componentVariants; track variant) {
{{ variant }}
A
B
}

Layout Spacing Variants

Semantic spacing tokens for layout elements

@for (variant of layoutVariants; track variant) {
{{ variant }}
Section A
Section B
}

Flexible Spacer

Spacer that grows to fill available space

Horizontal Flexible

Left
Right

Vertical Flexible

Top
Bottom

Custom Spacing

Custom Width: 100px
A
B
Custom Height: 80px
Top
Bottom

Real World Usage

Card Layout with Spacers

Header Content
Main content goes here with proper spacing
`, styleUrl: './spacer-demo.component.scss' }) export class SpacerDemoComponent { sizes: ('xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl')[] = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl']; componentVariants: ('component-xs' | 'component-sm' | 'component-md' | 'component-lg' | 'component-xl')[] = [ 'component-xs', 'component-sm', 'component-md', 'component-lg', 'component-xl' ]; layoutVariants: ('layout-xs' | 'layout-sm' | 'layout-md' | 'layout-lg' | 'layout-xl')[] = [ 'layout-xs', 'layout-sm', 'layout-md', 'layout-lg', 'layout-xl' ]; }