Saltar al contenido
NAVEGACIÓN · FREE

Anchor

Anchor forma parte de RayCraft Free.

Ejemplo

<div style="display:flex;align-items:flex-start;gap:1.5rem">
    <div style="flex:1;min-width:0">
        @foreach (var section in new[] { "Intro", "Setup", "Usage", "Extras" })
        {
            <h3 id="anchor-@section.ToLowerInvariant()">@section</h3>
            <p style="min-height:9rem">Text of the @section section. Scroll the page: the matching link is highlighted.</p>
        }
    </div>
    <Anchor Links="_links" Offset="120" />
</div>

@code {
    private readonly AnchorLink[] _links =
    [
        new("anchor-intro", "Introduction"),
        new("anchor-setup", "Setup"),
        new("anchor-usage", "Usage", [new("anchor-extras", "Extras")])
    ];
}

Un breve fragmento. Añade @using RayCraft.Blazor.Components a tu página y usa un modo de renderizado interactivo.

Incluido en RayCraft Free. Hay ejemplos que funcionan en el repositorio de GitHub (MIT); contiene código de ejemplo y demostración, no el código de la biblioteca.

Todos los controles ยท Documentación