Enterprise-level component library based on Bootstrap and Blazor

star nuget master download license repo commit

GoTop

Click to return to the top of the specified container

Click to return to the top usage

Demo

The Footer component appears at the bottom, and the page automatically scrolls back to the top when you click Back to the Top

This example passes the component client ID

Attributes

Loading...
@page "/gotops"
@inject IStringLocalizer<GoTops> Localizer

<h3>@Localizer["Title"]</h3>

<h4>@Localizer["H1"]</h4>

<Block Title="@Localizer["Block1Title"]" Introduction="@Localizer["Block1Intro"]">
    <div id="scroll" class="overflow-auto border border-secondary p-3" style="max-height: 180px; border-radius: 4px; position: relative;">
        <div style="height: 200px">
            <p>@Localizer["P1"]</p>
            <p>@Localizer["P2"]</p>
        </div>
        <footer class="footer">
            <div class="footer-text">
                <span>Bootstrap Blazor</span>
            </div>
            <GoTop Target="#scroll"></GoTop>
        </footer>
    </div>
</Block>

<AttributeTable Items="@GetAttributes()" />
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Website: https://www.blazor.zone or https://argozhang.github.io/

using BootstrapBlazor.Shared.Common;
using System.Collections.Generic;

namespace BootstrapBlazor.Shared.Pages
{
    /// <summary>
    /// 
    /// </summary>
    public sealed partial class GoTops
    {

        private IEnumerable<AttributeItem> GetAttributes() => new AttributeItem[]
        {
            new AttributeItem() {
                Name = "Target",
                Description = Localizer["Desc1"]!,
                Type = "string",
                ValueList = " — ",
                DefaultValue = " — "
            }
        };
    }
}

B 站相关视频链接

暂无

交流群

QQ Group:BootstrapAdmin & Blazor 795206915( Full) 675147445 Welcome to join the group discussion
Themes
Bootstrap
Ant Design (完善中)
Bluma (完善中)
LayUI (完善中)
Motronic (已集成)
An error has occurred. This application may no longer respond until reloaded. Reload