{
  "name": "Link",
  "category": "Typography",
  "subcategory": null,
  "description": "Styled anchor with underline + color variants.",
  "thumbnail": "/preview-cards/link.png",
  "hasDocsPage": true,
  "nugetPackage": "Lumeo",
  "files": [
    "UI/Link/Link.razor"
  ],
  "dependencies": [],
  "packageDependencies": [],
  "cssVars": [
    "--color-foreground",
    "--color-muted",
    "--color-muted-foreground",
    "--color-primary"
  ],
  "api": {
    "name": "Link",
    "category": "Typography",
    "subcategory": null,
    "description": "Styled anchor with underline + color variants.",
    "nugetPackage": "Lumeo",
    "files": [
      "UI/Link/Link.razor"
    ],
    "namespace": "Lumeo",
    "inheritsFrom": null,
    "implements": [],
    "parameters": [
      {
        "name": "Href",
        "type": "string?",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "External",
        "type": "bool",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "Variant",
        "type": "string",
        "default": "\"default\"",
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "Size",
        "type": "string?",
        "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",
      "--color-muted",
      "--color-muted-foreground",
      "--color-primary"
    ],
    "examples": [
      {
        "title": "Default",
        "code": "<Link Href=\"#\">Default link style</a>"
      },
      {
        "title": "Variants",
        "code": "<Link Href=\"#\" Variant=\"default\">Default</a>\n<Link Href=\"#\" Variant=\"muted\">Muted</a>\n<Link Href=\"#\" Variant=\"underline\">Underline</a>"
      },
      {
        "title": "External Link",
        "code": "<Link Href=\"https://github.com\" External=\"true\">\n    Visit GitHub\n</a>"
      },
      {
        "title": "With Size",
        "code": "<Link Href=\"#\" Size=\"xs\">Extra small</a>\n<Link Href=\"#\" Size=\"sm\">Small</a>\n<Link Href=\"#\">Default</a>\n<Link Href=\"#\" Size=\"lg\">Large</a>"
      }
    ],
    "subComponents": {},
    "parseFailed": false,
    "parseError": null
  },
  "$schema": "https://lumeo.nativ.sh/registry-component-schema.json",
  "key": "link",
  "docsUrl": "https://lumeo.nativ.sh/components/link",
  "sourceUrl": [
    {
      "file": "UI/Link/Link.razor",
      "url": "https://github.com/Brain2k-0005/Lumeo/tree/master/src/Lumeo/UI/Link/Link.razor"
    }
  ],
  "source": [
    {
      "path": "UI/Link/Link.razor",
      "content": "@namespace Lumeo\n\n<a href=\"@Href\" class=\"@CssClass\" @attributes=\"AllAttributes\">@ChildContent</a>\n\n@code {\n    [Parameter] public string? Href { get; set; }\n    [Parameter] public bool External { get; set; }\n    [Parameter] public string Variant { get; set; } = \"default\";\n    [Parameter] public string? Size { 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 Dictionary<string, object>? AllAttributes\n    {\n        get\n        {\n            if (!External)\n                return AdditionalAttributes;\n\n            var attrs = AdditionalAttributes != null\n                ? new Dictionary<string, object>(AdditionalAttributes)\n                : new Dictionary<string, object>();\n\n            attrs[\"target\"] = \"_blank\";\n            attrs[\"rel\"] = \"noopener noreferrer\";\n\n            return attrs;\n        }\n    }\n\n    private string VariantClasses => Variant switch\n    {\n        \"muted\" => \"text-muted-foreground hover:text-foreground\",\n        \"underline\" => \"underline underline-offset-4\",\n        _ => \"text-primary underline-offset-4 hover:underline\"\n    };\n\n    private string CssClass\n    {\n        get\n        {\n            var classes = new List<string> { VariantClasses };\n\n            if (!string.IsNullOrEmpty(Size))\n                classes.Add($\"text-{Size}\");\n\n            if (!string.IsNullOrEmpty(Class))\n                classes.Add(Class);\n\n            return string.Join(\" \", classes);\n        }\n    }\n}\n"
    }
  ],
  "slots": [
    {
      "name": "ChildContent",
      "owner": "Link",
      "type": "RenderFragment?",
      "description": null
    }
  ],
  "serviceDependencies": [],
  "cascadingDependencies": [],
  "relatedComponents": [],
  "keyboardInteractions": [],
  "tests": [
    "tests/Lumeo.Tests/Components/Button/ButtonTests.cs",
    "tests/Lumeo.Tests/Components/Link/LinkTests.cs",
    "tests/Lumeo.Tests/Components/NavigationMenu/NavigationMenuTests.cs",
    "tests/Lumeo.Tests/Components/Scrollspy/ScrollspyTests.cs"
  ],
  "mdSummary": "# Link\n\nStyled anchor with underline + color variants.\n\n**Package:** `Lumeo` · **Category:** Typography\n**Docs:** https://lumeo.nativ.sh/components/link\n\n## Parameters\n| Owner | Name | Type | Default | Description |\n|---|---|---|---|---|\n| Link | Href | `string?` | `` |  |\n| Link | External | `bool` | `` |  |\n| Link | Variant | `string` | `\"default\"` |  |\n| Link | Size | `string?` | `` |  |\n| Link | ChildContent | `RenderFragment?` | `` |  |\n| Link | Class | `string?` | `` |  |\n| Link | AdditionalAttributes | `Dictionary<string, object>?` | `` |  |\n\n## Slots\n- `ChildContent` (Link) — 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<Link />\n```\n\n## CSS variables\n`--color-foreground`, `--color-muted`, `--color-muted-foreground`, `--color-primary`\n\n## Files\n- `UI/Link/Link.razor`\n"
}