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

Stack Components Demo

Basic Stack (Column)

Item 1
Item 2
Item 3

Stack (Row)

Item 1
Item 2
Item 3

VStack (Vertical Stack)

@for (spacing of spacings; track spacing) {

{{ spacing }} spacing

Item A
Item B
Item C
}

HStack (Horizontal Stack)

@for (spacing of spacings; track spacing) {

{{ spacing }} spacing

Item A
Item B
Item C
}

Alignment Options

VStack Alignment

@for (align of alignments; track align) {
align="{{ align }}"
Small
Medium Item
Large Item Here
}

HStack Alignment

@for (align of alignments; track align) {
align="{{ align }}"
Small
Medium
Two lines
Large
Item
Three lines
}

Justify Options

HStack Justify (full width)

@for (justify of justifyOptions; track justify) {
justify="{{ justify }}"
A
B
C
}

With Dividers

VStack with Dividers

Section One
Section Two
Section Three

HStack with Dividers

Left
Center
Right

Responsive Behavior

The HStack below converts to a VStack on small screens:

Item 1
Item 2
Item 3
Item 4

Nested Stacks

Header Section
Left Column
Item 2
Item 3
Right Column
Item B
Item C
`, styleUrl: './stack-demo.component.scss' }) export class StackDemoComponent { spacings = ['xs', 'sm', 'md', 'lg', 'xl'] as const; alignments = ['start', 'center', 'end', 'stretch'] as const; justifyOptions = ['start', 'center', 'end', 'between', 'around', 'evenly'] as const; }