{
  "name": "Stack",
  "category": "Layout",
  "subcategory": null,
  "description": "Vertical flex wrapper with gap prop.",
  "thumbnail": "/preview-cards/stack.png",
  "hasDocsPage": true,
  "nugetPackage": "Lumeo",
  "files": [
    "UI/Stack/Stack.razor"
  ],
  "dependencies": [],
  "packageDependencies": [],
  "cssVars": [
    "--color-foreground"
  ],
  "api": {
    "name": "Stack",
    "category": "Layout",
    "subcategory": null,
    "description": "Vertical flex wrapper with gap prop.",
    "nugetPackage": "Lumeo",
    "files": [
      "UI/Stack/Stack.razor"
    ],
    "namespace": "Lumeo",
    "inheritsFrom": null,
    "implements": [],
    "parameters": [
      {
        "name": "Direction",
        "type": "StackDirection",
        "default": "StackDirection.Vertical",
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "Gap",
        "type": "string?",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "Align",
        "type": "string?",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "Justify",
        "type": "string?",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "Wrap",
        "type": "bool",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "ChildContent",
        "type": "RenderFragment?",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "Class",
        "type": "string?",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "AdditionalAttributes",
        "type": "Dictionary<string, object>?",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": true
      }
    ],
    "events": [],
    "enums": [
      {
        "name": "StackDirection",
        "values": [
          "Vertical",
          "Horizontal"
        ],
        "description": null
      }
    ],
    "records": [],
    "cssVars": [
      "--color-foreground"
    ],
    "examples": [
      {
        "title": "Basic Vertical",
        "code": "<Stack Gap=\"3\">\n    <div>Item 1</div>\n    <div>Item 2</div>\n    <div>Item 3</div>\n</Stack>"
      },
      {
        "title": "Horizontal",
        "code": "<Stack Direction=\"Stack.StackDirection.Horizontal\" Gap=\"3\">\n    <div>Item 1</div>\n    <div>Item 2</div>\n    <div>Item 3</div>\n</Stack>"
      },
      {
        "title": "Gap Sizes",
        "code": "<Stack Direction=\"Stack.StackDirection.Horizontal\" Gap=\"1\">...</Stack>\n<Stack Direction=\"Stack.StackDirection.Horizontal\" Gap=\"4\">...</Stack>\n<Stack Direction=\"Stack.StackDirection.Horizontal\" Gap=\"8\">...</Stack>"
      },
      {
        "title": "Alignment",
        "code": "<Stack Direction=\"Stack.StackDirection.Horizontal\" Gap=\"4\" Align=\"center\" Justify=\"between\" Class=\"w-full\">\n    <div>Item 1</div>\n    <div>Item 2</div>\n    <div>Item 3</div>\n</Stack>"
      }
    ],
    "subComponents": {},
    "parseFailed": false,
    "parseError": null
  },
  "$schema": "https://lumeo.nativ.sh/registry-component-schema.json",
  "key": "stack",
  "docsUrl": "https://lumeo.nativ.sh/components/stack",
  "sourceUrl": [
    {
      "file": "UI/Stack/Stack.razor",
      "url": "https://github.com/Brain2k-0005/Lumeo/tree/master/src/Lumeo/UI/Stack/Stack.razor"
    }
  ],
  "source": [
    {
      "path": "UI/Stack/Stack.razor",
      "content": "@namespace Lumeo\n\n<div class=\"@CssClass\" @attributes=\"AdditionalAttributes\">@ChildContent</div>\n\n@code {\n    [Parameter] public StackDirection Direction { get; set; } = StackDirection.Vertical;\n    [Parameter] public string? Gap { get; set; }\n    [Parameter] public string? Align { get; set; }\n    [Parameter] public string? Justify { get; set; }\n    [Parameter] public bool Wrap { get; set; }\n    [Parameter] public RenderFragment? ChildContent { get; set; }\n    [Parameter] public string? Class { get; set; }\n    [Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }\n\n    private string CssClass\n    {\n        get\n        {\n            var direction = Direction == StackDirection.Vertical ? \"flex flex-col\" : \"flex flex-row\";\n            var gap = !string.IsNullOrEmpty(Gap) ? $\"gap-{Gap}\" : \"\";\n            var align = !string.IsNullOrEmpty(Align) ? $\"items-{Align}\" : \"\";\n            var justify = !string.IsNullOrEmpty(Justify) ? $\"justify-{Justify}\" : \"\";\n            var wrap = Wrap ? \"flex-wrap\" : \"\";\n            return $\"{direction} {gap} {align} {justify} {wrap} {Class}\".Trim();\n        }\n    }\n\n    public enum StackDirection { Vertical, Horizontal }\n}\n"
    }
  ],
  "slots": [
    {
      "name": "ChildContent",
      "owner": "Stack",
      "type": "RenderFragment?",
      "description": null
    }
  ],
  "serviceDependencies": [],
  "cascadingDependencies": [],
  "relatedComponents": [],
  "keyboardInteractions": [],
  "tests": [
    "tests/Lumeo.Tests/Components/Stack/StackTests.cs"
  ],
  "mdSummary": "# Stack\n\nVertical flex wrapper with gap prop.\n\n**Package:** `Lumeo` · **Category:** Layout\n**Docs:** https://lumeo.nativ.sh/components/stack\n\n## Parameters\n| Owner | Name | Type | Default | Description |\n|---|---|---|---|---|\n| Stack | Direction | `StackDirection` | `StackDirection.Vertical` |  |\n| Stack | Gap | `string?` | `` |  |\n| Stack | Align | `string?` | `` |  |\n| Stack | Justify | `string?` | `` |  |\n| Stack | Wrap | `bool` | `` |  |\n| Stack | ChildContent | `RenderFragment?` | `` |  |\n| Stack | Class | `string?` | `` |  |\n| Stack | AdditionalAttributes | `Dictionary<string, object>?` | `` |  |\n\n## Slots\n- `ChildContent` (Stack) — RenderFragment slot\n\n## Events\n- (none)\n\n## Sub-components\n- (none)\n\n## Cascading values it expects\n- (none)\n\n## Services it injects\n- (none)\n\n## Keyboard\n—\n\n## Example\n```razor\n<Stack />\n```\n\n## CSS variables\n`--color-foreground`\n\n## Files\n- `UI/Stack/Stack.razor`\n"
}