| Name |
Type |
Default value |
Description |
|---|
| AutoGoToTop |
bool |
false |
Enables auto-scroll to the top of the main container on navigation. A navigation that only changes the fragment of the url (an in-page anchor) is left alone. PersistScroll takes precedence over it. |
| AutoScroll |
bool |
false |
Keeps the main container pinned to the end of its content as the content grows, for as long as the reader left it standing at the end. |
| AutoScrollThreshold |
int |
0 |
How near the end of the content (in pixels) the main container has to have been left for AutoScroll to keep pinning it there. |
| AvoidKeyboard |
bool |
false |
Takes the height of the on-screen keyboard off the scrolling area while it is open, publishes it on the root as the --bit-ash-keyboard-inset CSS variable and marks the root with the data-bit-ash-keyboard attribute. A focused element the shorter middle leaves below its bottom edge is scrolled back into view. It measures 0 wherever the browser shrinks the layout viewport itself. |
| ChildContent |
RenderFragment? |
null |
The content of the app shell. It is rendered inside the main (scrolling) container. |
| Classes |
BitAppShellClassStyles? |
null |
Custom CSS classes for different parts of the app shell. |
| FullScreen |
bool |
false |
Pins the app shell to the four edges of the screen, so it fills the window whatever height the page around it has - which is what saves the host page from carrying a height of its own down through html and body. |
| Gutter |
BitScrollbarGutter? |
null |
Reserves the room the scrollbar of the main container takes, whether or not there is anything left to scroll, so the layout does not shift between a page that scrolls and a page that does not. |
| NoBottomInset |
bool |
false |
Removes the bottom safe area inset of the app shell, leaving the other three where they are. |
| NoEndInset |
bool |
false |
Removes the trailing side safe area inset of the app shell - the right of a left-to-right shell - leaving the other three where they are. |
| NoInsets |
bool |
false |
Removes the safe area insets, so the four edges of the app shell are not inset at all and the content fills the whole screen. |
| NoScroll |
bool |
false |
Prevents the reader from scrolling the main container at all; the content that overflows is clipped. The scrolling methods of the component still move it. |
| NoStartInset |
bool |
false |
Removes the leading side safe area inset of the app shell - the left of a left-to-right shell - leaving the other three where they are. |
| NoTopInset |
bool |
false |
Removes the top safe area inset of the app shell, leaving the other three where they are. |
| OnKeyboardInsetChanged |
EventCallback<double> |
|
Callback for how much of the app shell the on-screen keyboard covers, in pixels, raised as that changes and with 0 as it closes. Only a shell with AvoidKeyboard set measures it at all. |
| OnReachedBottom |
EventCallback |
|
Callback for when the main container reaches the bottom of its content, raised once per arrival rather than on every frame that stays there. |
| OnReachedLeft |
EventCallback |
|
Callback for when the main container reaches the visual left edge of its content, which is the same edge whichever way the shell reads. |
| OnReachedRight |
EventCallback |
|
Callback for when the main container reaches the visual right edge of its content. |
| OnReachedTop |
EventCallback |
|
Callback for when the main container reaches the top of its content. |
| OnScroll |
EventCallback<BitScrollOffset> |
|
Callback for the scroll position of the main container, raised as it is scrolled. Nothing is measured or reported until one of the scroll callbacks is handled. |
| OnScrollEnd |
EventCallback<BitScrollOffset> |
|
Callback for when a scroll of the main container comes to a stop. |
| OnScrollStart |
EventCallback<BitScrollOffset> |
|
Callback for when a scroll of the main container begins. |
| OverflowX |
BitOverflow? |
null |
What the main container does with content that overflows it sideways. Hidden clips it instead of offering it, and NoScroll wins over both axes. |
| OverflowY |
BitOverflow? |
null |
What the main container does with content that overflows it downwards. See OverflowX. |
| Overscroll |
BitOverscroll? |
null |
Determines what happens when the main container is scrolled past its edge. It defaults to None: no scroll chaining out of the shell and no pull-to-refresh or rubber-banding. |
| PersistScroll |
bool |
false |
Persists scroll position of the main container per url in session storage and restores it on navigation; another page with nothing stored opens at its top, while a navigation that only changes the query (a filter, a search box) or the fragment is left where it stands. One shell per page owns the store, so it is not part of BitAppShellParams. |
| PreserveScroll |
bool |
false |
Keeps the place of the reader when content is added above what they are looking at, which is what an endless list growing upwards needs. |
| ReachOffset |
int |
0 |
How near an edge (in pixels) counts as having reached it, for OnReachedTop and OnReachedBottom. |
| ScrollBehavior |
BitScrollBehavior? |
null |
The scroll behavior of the main container, which decides how every move the reader does not make by hand is animated. It defaults to Smooth, and is taken back off under the reduced motion preference. |
| ScrollPadding |
string? |
null |
The room the main container keeps between its edges and anything scrolled into view inside it, as any CSS length - which is what keeps a header stuck to the top of the shell from covering what was just scrolled to. |
| ScrollRestoration |
BitAppShellScrollRestoration |
BitAppShellScrollRestoration.Url |
Which navigations PersistScroll restores: Url restores every navigation to a url left scrolled (app tabs); History only the back and forward buttons, opening every other navigation at its top as a browser does. |
| ScrollThrottle |
int |
0 |
The shortest interval (in milliseconds) between two OnScroll reports. The default of 0 reports once per animation frame. |
| StableInsets |
bool |
false |
Sizes the four inset bars from the largest safe areas the device can ask for rather than from the ones it is asking for right now, so the layout is not relaid out as the browser slides its own chrome in and out. |
| Styles |
BitAppShellClassStyles? |
null |
Custom CSS styles for different parts of the app shell. |
| TrackScrollState |
bool |
false |
Marks the root with data-bit-ash-scrolled while the main container is away from its top, and with data-bit-ash-scroll-direction (up or down) for the way it was last scrolled, so a header can lift or hide itself in CSS alone. |
| ValueList |
BitCascadingValueList? |
null |
The cascading value list to be provided for the children of the app shell. Its values are provided before (so they can be overridden by) the ones of the Values parameter. |
| Values |
IEnumerable<BitCascadingValue>? |
null |
The cascading values to be provided for the children of the app shell. |
| Name |
Type |
Default value |
Description |
|---|
| ClearPersistedScroll |
Func<string?, Task> |
|
Forgets every scroll position PersistScroll has kept, for the pages of this app shell and of any other - or, given a url, only the position kept for that one page. |
| Container |
const string |
"BitAppShell.Container" |
The name the app shell cascades the element of its main container under, which is what a Modal, a Panel, a Dialog or an Overlay inside the shell reads to hold the right scroller. |
| ContainerId |
const string |
"BitAppShell-container" |
The id the main container carries when the app shell has no Id of its own. |
| ContainerRef |
ElementReference? |
null |
The element reference to the main container of the app shell. |
| GetScrollOffset |
Func<Task<BitScrollOffset?>> |
|
Reads where the main container currently stands, measured in the browser. |
| GoToBottom |
Func<BitScrollBehavior?, Task> |
|
Scrolls the main container to the bottom of its content. |
| GoToTop |
Func<BitScrollBehavior?, Task> |
|
Scrolls the main container to top. |
| MainContainerId |
string |
|
The id of the main container element of this app shell: ContainerId, or the Id of the shell with "-container" after it. |
| Refresh |
Func<Task> |
|
Re-measures the main container and reports whatever has changed since it was last measured - for the changes neither its own size nor its content announce, such as a web font that has finished loading. |
| ScrollBy |
Func<double, double, BitScrollBehavior?, Task> |
|
Scrolls the main container by an amount, from wherever it currently stands. |
| ScrollTo |
Func<double?, double?, BitScrollBehavior?, Task> |
|
Scrolls the main container to a position. A null axis is left where it stands. |
| ScrollToElement |
Func<string, double, bool, BitScrollAlignment, BitScrollBehavior?, Task> |
|
Brings an element inside the main container into view by scrolling the container itself rather than every scroller the page sits in. |
| Name |
Type |
Default value |
Description |
|---|
| AriaLabel |
string? |
null |
Gets or sets the accessible label for the component, used by assistive technologies. |
| Class |
string? |
null |
Gets or sets the CSS class name(s) to apply to the rendered element. |
| Dir |
BitDir? |
null |
Gets or sets the text directionality for the component's content. |
| Disabled |
bool |
false |
Gets or sets a value indicating whether the component is disabled and cannot respond to user interaction. |
| ForceAnimation |
bool |
false |
Gets or sets a value indicating whether the component's animations play at their full duration even when reduced motion is requested. |
| HtmlAttributes |
Dictionary<string, object> |
new Dictionary<string, object>() |
Captures additional HTML attributes to be applied to the rendered element, in addition to the component's parameters. |
| Id |
string? |
null |
Gets or sets the unique identifier for the component's root element. |
| Style |
string? |
null |
Gets or sets the CSS style string to apply to the rendered element. |
| TabIndex |
string? |
null |
Gets or sets the tab order index for the component when navigating with the keyboard. |
| Visibility |
BitVisibility |
BitVisibility.Visible |
Gets or sets the visibility state (visible, hidden, or collapsed) of the component. |
BitCascadingValue properties
One value to cascade: what is cascaded, as which type, under which name, and whether it is fixed or provided at all. Bare values and (value, name) tuples of the common primitive, date, string and BitDir types convert to it implicitly. These are the members the shell's Values are usually built with; the BitCascadingValueProvider page documents all of them, including the factories and the typed BitCascadingValue<T>.
| Name |
Type |
Default value |
Description |
|---|
| Value |
object? |
null |
The value to be provided. Assigning a value not assignable to ValueType throws an ArgumentException; assigning a different value refreshes the consumers. |
| Name |
string? |
null |
The optional name of the cascading value, matched case-insensitively; an empty or white-space name means no name. |
| IsFixed |
bool |
false |
Marks a value that never changes, so its consumers are not subscribed for change notifications. |
| Enabled |
bool |
true |
Whether the value is provided at all. A disabled value is skipped as if it had never been added, so an outer or root-level value of the same type and name shows through. |