Enterprise-level component library based on Bootstrap and Blazor

star nuget license download repo commit master coverage

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>GoTop</h3>

<h4>Click to return to the top of the specified container</h4>

<DemoBlock Title="Basic usage" Introduction="Click to return to the top usage" Name="Normal">
    <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>The Footer component appears at the bottom, and the page automatically scrolls back to the top when you click Back to the Top</p>
            <p>This example passes the component client ID</p>
        </div>
        <footer class="footer">
            <div class="footer-text">
                <span>Bootstrap Blazor</span>
            </div>
            <GoTop Target="#scroll"></GoTop>
        </footer>
    </div>
</DemoBlock>

<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.Samples;

/// <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 675147445 Welcome to join the group discussion
Themes
Bootstrap
Motronic
Ant Design (完善中)
LayUI (完善中)
An error has occurred. This application may no longer respond until reloaded. Reload