Docs Quickstart Figma Flowbite
1.3.0
Getting started
Customize
Components
API Reference NEW
components / Class

ScrollTopComponent

Decorators:@Component
Selectors:flowbite-scroll-top
Extends:BaseComponent<FlowbiteClass>
Implements:OnInit

Provide a way to go at the top of the page via a button

Properties

NameTypeDescription
color
ModelSignal<keyof ScrollTopColors>

Set the scroll top color

contentClasses
inherited from BaseComponent
Signal<TClass>

Computed signal storing the component classes used in its template

customStyle
ModelSignal<{ root?: { base?: string | undefined; color?: { [x: string]: string | undefined; primary?: string | undefined; dark?: string | undefined; blue?: string | undefined; gray?: string | undefined; green?: string | undefined; lime?: string | undefined; purple?: string | undefined; red?: string | undefined; } | undefined; position?: { [x: string]: string | undefined; 'bottom-center'?: string | undefined; 'top-center'?: string | undefined; 'top-left'?: string | undefined; 'top-right'?: string | undefined; 'center-left'?: string | undefined; 'center-right'?: string | undefined; 'bottom-left'?: string | undefined; 'bottom-right'?: string | undefined; } | undefined; } | undefined; }>

Set the custom style for this scroll top

domSanitizer
r
DomSanitizer

DomSanitizer service

flowbiteId
r
inherited from BaseComponent
WritableSignal<Guid>

Auto generated GUID for each flowbite-angular component

Its default value is 00000000-0000-0000-0000-000000000000, and is set to a random GUID inside the afterNextRender hook

icon
ModelSignal<TemplateRef<unknown> | undefined>

Set the scroll top icon

iconRegistry
r
IconRegistry

IconRegistry service

injector
r
inherited from BaseComponent
Injector

Injector instance injected to be used as an injector context where there is no default one.

Example usage
public ngOnInit(): void {
  afterNextRender(
     () => {},
     { injector: this.injector }
  );
}
position
ModelSignal<keyof ScrollTopPositions>

Set the scroll top position

themeService
r
ScrollTopThemeService

Service injected used to generate class

Methods

fetchClass()

implements BaseComponent

Function to load component's classes

Presentation
fetchClass(): FlowbiteClass;
Returns

init()

overrides BaseComponent

Function loaded during OnInit lifecycle hook. It initialize requirments for the component.

Presentation
init(): void;
Returns
void

ngOnInit()

inherited from BaseComponent

Initialize component.

A call to verify and init function is done. Then a new Guid is set in the afterNextRender hook.

Presentation
ngOnInit(): void;
Returns
void

onClick()

Navigate to the top of the page

Presentation
onClick(): void;
Returns
void
Flowbite

© 2019-2024 Flowbite™ is a registered trademark. All Rights Reserved.