{
  "name": "Center",
  "category": "Layout",
  "subcategory": null,
  "description": "Flexbox helper that centers its children on both axes.",
  "thumbnail": "/preview-cards/center.png",
  "hasDocsPage": true,
  "nugetPackage": "Lumeo",
  "files": [
    "UI/Center/Center.razor"
  ],
  "dependencies": [],
  "packageDependencies": [],
  "cssVars": [
    "--color-foreground"
  ],
  "api": {
    "name": "Center",
    "category": "Layout",
    "subcategory": null,
    "description": "Flexbox helper that centers its children on both axes.",
    "nugetPackage": "Lumeo",
    "files": [
      "UI/Center/Center.razor"
    ],
    "namespace": "Lumeo",
    "inheritsFrom": null,
    "implements": [],
    "parameters": [
      {
        "name": "Height",
        "type": "string?",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "Inline",
        "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": [],
    "records": [],
    "cssVars": [
      "--color-foreground"
    ],
    "examples": [
      {
        "title": "Basic Centering",
        "code": "<Center Class=\"h-32 w-full\">\n    <Text Color=\"muted\">Centered content</Text>\n</Center>"
      },
      {
        "title": "With Fixed Height",
        "code": "<Center Height=\"200px\">\n    <Stack Align=\"center\" Gap=\"2\">\n        <DynamicIcon Name=\"Image\" Class=\"h-8 w-8 text-muted-foreground\" />\n        <Text Color=\"muted\" Size=\"sm\">No image selected</Text>\n    </Stack>\n</Center>"
      },
      {
        "title": "Inline Center",
        "code": "<Text>\n    Click the\n    <Center Inline=\"true\" Class=\"h-6 w-6 rounded bg-primary/20 mx-1\">\n        <DynamicIcon Name=\"Plus\" Class=\"h-3 w-3 text-primary\" />\n    </Center>\n    icon to add an item.\n</Text>"
      }
    ],
    "subComponents": {},
    "parseFailed": false,
    "parseError": null
  },
  "$schema": "https://lumeo.nativ.sh/registry-component-schema.json",
  "key": "center",
  "docsUrl": "https://lumeo.nativ.sh/components/center",
  "sourceUrl": [
    {
      "file": "UI/Center/Center.razor",
      "url": "https://github.com/Brain2k-0005/Lumeo/tree/master/src/Lumeo/UI/Center/Center.razor"
    }
  ],
  "source": [
    {
      "path": "UI/Center/Center.razor",
      "content": "@namespace Lumeo\n\n<div class=\"@CssClass\" style=\"@StyleAttribute\" @attributes=\"AdditionalAttributes\">@ChildContent</div>\n\n@code {\n    [Parameter] public string? Height { get; set; }\n    [Parameter] public bool Inline { 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 display = Inline ? \"inline-flex\" : \"flex\";\n            var height = string.IsNullOrEmpty(Height) ? \"h-full\" : null;\n            return string.Join(\" \", new[] { display, \"items-center justify-center\", height, Class }.Where(s => !string.IsNullOrWhiteSpace(s)));\n        }\n    }\n\n    private string? StyleAttribute => !string.IsNullOrEmpty(Height) ? $\"height: {Height}\" : null;\n}\n"
    }
  ],
  "slots": [
    {
      "name": "ChildContent",
      "owner": "Center",
      "type": "RenderFragment?",
      "description": null
    }
  ],
  "serviceDependencies": [],
  "cascadingDependencies": [],
  "relatedComponents": [],
  "keyboardInteractions": [],
  "tests": [
    "tests/Lumeo.Tests/Components/Center/CenterTests.cs",
    "tests/Lumeo.Tests/Components/Container/ContainerTests.cs"
  ],
  "mdSummary": "# Center\n\nFlexbox helper that centers its children on both axes.\n\n**Package:** `Lumeo` · **Category:** Layout\n**Docs:** https://lumeo.nativ.sh/components/center\n\n## Parameters\n| Owner | Name | Type | Default | Description |\n|---|---|---|---|---|\n| Center | Height | `string?` | `` |  |\n| Center | Inline | `bool` | `` |  |\n| Center | ChildContent | `RenderFragment?` | `` |  |\n| Center | Class | `string?` | `` |  |\n| Center | AdditionalAttributes | `Dictionary<string, object>?` | `` |  |\n\n## Slots\n- `ChildContent` (Center) — 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<Center />\n```\n\n## CSS variables\n`--color-foreground`\n\n## Files\n- `UI/Center/Center.razor`\n"
}