{
  "name": "BlurFade",
  "category": "Motion",
  "subcategory": null,
  "description": "Motion primitive: blur + fade-in on mount or when in view.",
  "thumbnail": "/preview-cards/blur-fade.png",
  "hasDocsPage": true,
  "nugetPackage": "Lumeo.Motion",
  "files": [
    "UI/BlurFade/BlurFade.razor"
  ],
  "dependencies": [],
  "packageDependencies": [],
  "cssVars": [
    "--color-foreground"
  ],
  "api": {
    "name": "BlurFade",
    "category": "Motion",
    "subcategory": null,
    "description": "Motion primitive: blur + fade-in on mount or when in view.",
    "nugetPackage": "Lumeo.Motion",
    "files": [
      "UI/BlurFade/BlurFade.razor"
    ],
    "namespace": "Lumeo",
    "inheritsFrom": null,
    "implements": [
      "IAsyncDisposable"
    ],
    "parameters": [
      {
        "name": "ChildContent",
        "type": "RenderFragment?",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "DelayMs",
        "type": "int",
        "default": "0",
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "DurationMs",
        "type": "int",
        "default": "600",
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "BlurPx",
        "type": "int",
        "default": "8",
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "Yoffset",
        "type": "int",
        "default": "8",
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "Once",
        "type": "bool",
        "default": "true",
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "ForceHidden",
        "type": "bool",
        "default": null,
        "description": "When true, always start in the hidden state and animate in — even if the element is already in the viewport at mount. Default (false) is prerender-friendly: above-the-fold BlurFades stay statically visible to avoid a flash of blurred content on first paint. Set to true for docs demos or controlled \"Replay\" scenarios where you always want the animation to play.",
        "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": [],
    "subComponents": {},
    "parseFailed": false,
    "parseError": null
  },
  "$schema": "https://lumeo.nativ.sh/registry-component-schema.json",
  "key": "blur-fade",
  "docsUrl": "https://lumeo.nativ.sh/components/blur-fade",
  "sourceUrl": [
    {
      "file": "UI/BlurFade/BlurFade.razor",
      "url": "https://github.com/Brain2k-0005/Lumeo/tree/master/src/Lumeo.Motion/UI/BlurFade/BlurFade.razor"
    }
  ],
  "source": [
    {
      "path": "UI/BlurFade/BlurFade.razor",
      "content": "@namespace Lumeo\n@implements IAsyncDisposable\n@inject ComponentInteropService Interop\n\n<div id=\"@_elementId\" class=\"@CssClass\" style=\"@StyleString\" data-motion-visible=\"@InitialMotionState\" @attributes=\"AdditionalAttributes\">\n    @ChildContent\n</div>\n\n@code {\n    [Parameter] public RenderFragment? ChildContent { get; set; }\n    [Parameter] public int DelayMs { get; set; } = 0;\n    [Parameter] public int DurationMs { get; set; } = 600;\n    [Parameter] public int BlurPx { get; set; } = 8;\n    [Parameter] public int Yoffset { get; set; } = 8;\n    [Parameter] public bool Once { get; set; } = true;\n    /// <summary>\n    /// When true, always start in the hidden state and animate in — even if the element is already\n    /// in the viewport at mount. Default (false) is prerender-friendly: above-the-fold BlurFades\n    /// stay statically visible to avoid a flash of blurred content on first paint. Set to true for\n    /// docs demos or controlled \"Replay\" scenarios where you always want the animation to play.\n    /// </summary>\n    [Parameter] public bool ForceHidden { get; set; }\n    [Parameter] public string? Class { get; set; }\n    [Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }\n\n    private readonly string _elementId = $\"lumeo-blurfade-{Guid.NewGuid():N}\";\n    private bool _registered;\n\n    private string CssClass => string.Join(\" \", new[] { \"lumeo-blur-fade\", Class }.Where(s => !string.IsNullOrWhiteSpace(s)));\n\n    // When ForceHidden, render the initial hidden state directly via attribute so the very first\n    // paint already shows the to-be-animated state. Prevents a one-frame flash of fully-visible\n    // content before the JS observer marks it hidden.\n    private string? InitialMotionState => ForceHidden ? \"false\" : null;\n\n    private string StyleString =>\n        $\"--lumeo-blur-px: {BlurPx}px; --lumeo-blur-y: {Yoffset}px; --lumeo-blur-duration: {DurationMs}ms;\";\n\n    protected override async Task OnAfterRenderAsync(bool firstRender)\n    {\n        if (firstRender && !_registered)\n        {\n            _registered = true;\n            try\n            {\n                await Interop.MotionBlurFade(_elementId, DelayMs, Once, ForceHidden);\n            }\n            catch (JSDisconnectedException) { }\n        }\n    }\n\n    public async ValueTask DisposeAsync()\n    {\n        if (_registered)\n        {\n            await Interop.MotionDisposeObserver(_elementId);\n        }\n    }\n}\n"
    }
  ],
  "slots": [
    {
      "name": "ChildContent",
      "owner": "BlurFade",
      "type": "RenderFragment?",
      "description": null
    }
  ],
  "serviceDependencies": [
    {
      "service": "ComponentInteropService",
      "namespace": ""
    }
  ],
  "cascadingDependencies": [],
  "relatedComponents": [],
  "keyboardInteractions": [],
  "tests": [
    "tests/Lumeo.Tests/Components/BlurFade/BlurFadeTests.cs"
  ],
  "mdSummary": "# BlurFade\n\nMotion primitive: blur + fade-in on mount or when in view.\n\n**Package:** `Lumeo.Motion` · **Category:** Motion\n**Docs:** https://lumeo.nativ.sh/components/blur-fade\n\n## Parameters\n| Owner | Name | Type | Default | Description |\n|---|---|---|---|---|\n| BlurFade | ChildContent | `RenderFragment?` | `` |  |\n| BlurFade | DelayMs | `int` | `0` |  |\n| BlurFade | DurationMs | `int` | `600` |  |\n| BlurFade | BlurPx | `int` | `8` |  |\n| BlurFade | Yoffset | `int` | `8` |  |\n| BlurFade | Once | `bool` | `true` |  |\n| BlurFade | ForceHidden | `bool` | `` | When true, always start in the hidden state and animate in — even if the element is already in the viewport at mount. Default (false) is prerender-friendly: above-the-fold BlurFades stay statically visible to avoid a flash of blurred content on first paint. Set to true for docs demos or controlled \"Replay\" scenarios where you always want the animation to play. |\n| BlurFade | Class | `string?` | `` |  |\n| BlurFade | AdditionalAttributes | `Dictionary<string, object>?` | `` |  |\n\n## Slots\n- `ChildContent` (BlurFade) — 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- `ComponentInteropService` ()\n\n## Keyboard\n—\n\n## Example\n```razor\n<BlurFade />\n```\n\n## CSS variables\n`--color-foreground`\n\n## Files\n- `UI/BlurFade/BlurFade.razor`\n"
}