Extras
NavPanel
Bit.BlazorUI.Extras
BitNavPanel is a navigation component specialized to be rendered in a vertical panel. In its core it's utilizing the BitNav component to render the nav items, so the whole nav API - the item tree, the URL matching, the templates and the keyboard navigation - is available through it.
The Open button above each example is the one a small screen shows: the panel is a permanent column on a wide screen and an off-canvas drawer below the md breakpoint, which is what IsOpen drives.
The Open button above each example is the one a small screen shows: the panel is a permanent column on a wide screen and an off-canvas drawer below the md breakpoint, which is what IsOpen drives.
Notes
To use this component, you need to install the Bit.BlazorUI.Extras(opens in a new tab) nuget package, as described in the Optional steps of the Getting started page.
Usage
Every example is live. Open its code to see exactly what produced the component running underneath.
Basic
The panel renders the tree given to Items, with a header, a search box and the toggle
button on top of it. Each BitNavItem carries its Text, an optional
IconName, Description and Url, and the items nested in its
ChildItems turn it into an expandable node. Typing in the search box filters the list,
and the toggle button collapses the panel down to a rail of icons.
FitWidth
By default the panel takes the width its container gives it. FitWidth shrinks it to the
width of its widest item, so it takes no more room than the items it holds. Its width is then
the items' rather than the panel's, and they lose their text the moment the panel collapses -
so this is the one mode whose toggle resizes in a single step instead of sliding.
FullWidth
Width
ExpandOnHover
ExpandOnHover brings the collapsed panel back to its full width while the pointer is over
it - or while the keyboard is inside it, so the text of the items is reachable without a mouse -
so the rail stays a rail and still shows what its icons stand for on the way to one. The panel
widens in place, which moves the content beside it along with it. Collapse the panel below with
its toggle button, then hover it or tab into it.
NoToggle
NoToggle removes the rail mode altogether: the toggle button is gone and the panel can no
longer be collapsed, not even through IsToggled or the Toggle method.
HideToggle only takes the button away and leaves the mode itself in place, for a panel
that is toggled from somewhere else on the page. ToggleAriaLabel renames the button the
two of them take away, which otherwise says what it is about to do in English.
Icon
IconUrl renders a logo at the start of the header, and IconNavUrl wraps it in an
anchor pointing at the home page of the app. The logo is hidden while the panel is collapsed
into its rail, where there is no room for it. IconAriaLabel is what a screen reader
reads it as - the name of the link, or the alternative text of the bare image - which is not
the same thing as the name of the navigation landmark AriaLabel gives the nav.
SearchBoxPlaceholder
NoSearchBox
Search
An item matches when every word of the term appears in its Text, its Description
or its Data, so each word typed narrows the list further; a matched item keeps the whole
branch under it, so a group that matches still shows what it groups. SearchText two-way
binds the term, so the search can be driven from anywhere on the page, OnSearch reports
every change of it, and SearchDebounceTime sets how long the typing settles before the
list is filtered. SearchFilter replaces the matching itself with a function of your own -
here only the text of an item is looked at, and only from its start. However many items the
search leaves, a live region announces the count to a screen reader, which
SearchAnnouncementProvider rewrites for a localized app.
Last searched term:
EmptyListMessage
Selection
In the default Automatic mode the panel keeps the selection in sync with the current URL,
matched as NavMatch says (exactly, by prefix, by wildcard or by regular expression) and
against the AdditionalUrls of an item as well as its own. The Manual mode hands
that over to the app: the clicked item becomes the selected one, the initial selection comes
from DefaultSelectedItem (which the automatic mode has no use for, since the URL is what
decides there), and SelectedItem two-way binds it so the selection can be driven from
anywhere else on the page. Reselectable reports a click on the item that is already
selected as a selection of its own.
Selected item: Home
Expansion
AllExpanded opens every group as it is first rendered, SingleExpand keeps a single
open branch at a time - opening one closes the one that was open - and NoCollapse hides
the chevrons altogether, for a tree that is only ever opened by the URL or by the selection.
ExpandAriaLabel and CollapseAriaLabel name the chevron in each of its two states,
for the items that carry no name of their own for it. The panel below is in single-expand mode.
Custom items
Behavior
On a small screen the open panel closes on a click on the overlay behind it, on the Escape key,
on a swipe towards the side it came from, and on the navigation of an item.
NoAutoClose keeps it open after a navigation, NoOverlay drops the overlay so the
page behind it stays clickable, and NoSwipe turns the swipe gesture off. The panel below
shows all three, so the only ways left to close it are its own button and the Escape key,
which none of the three takes away. AutoFocus goes the
other way and moves the focus into the drawer as it opens - onto the search box, or onto the
first item of a panel without one - which is what a surface covering the page is expected to
do. All of these belong to the drawer of a small screen: the column of a wide one is not a
surface over the page, so it neither closes on the Escape key nor takes the focus.
Templates
Header and Footer replace the two ends of the panel - the header replaces the logo
and the buttons beside it, so a custom header that wants to keep the rail renders a control of
its own calling the Toggle method - while ItemTemplate customizes how the content
of every item is rendered, and HeaderTemplate does the same for the group headers of the
Grouped render type. ItemTemplateRenderMode and HeaderTemplateRenderMode
decide whether a template fills the link the panel renders, or replaces it outright.
Events
OnItemClick reports every click on an item, OnItemToggle every expand and collapse
of a group, and OnSelectItem the item that became the selected one.
Clicked item:
Toggled item:
Toggled item:
Public APIs
A reference to the panel drives it from the outside: Toggle switches the rail on and off,
Open and Close drive the small-screen drawer, ExpandAll and
CollapseAll open and close every group, ClearSearch empties the search box, and
FocusSearchBox moves the focus into it, leaving the rail first when the panel is
collapsed. One item at a time is reached the same way: ExpandItem, CollapseItem
and ToggleItem open and close a single branch, IsItemExpanded reports whether one
is open, SelectItem selects an item exactly like a click on it would, and
FocusItem moves the focus onto it, opening the branches it is nested in on the way.
Grouped
RenderType set to Grouped turns every root item into the header of the group it
holds instead of a link of its own, which is what a long menu split into named sections wants.
ReversedChevron moves the expander to the far end of each row, IndentValue sets
how far every level of depth is indented - with IndentPadding and
IndentReversedPadding for the room a row without children leaves in place of a chevron -
and NoPad takes the padding off the panel so its rows run to its edges.
Drawer
Below the md breakpoint the panel is an off-canvas drawer that covers the page, and it
behaves like the modal surface it looks like: it reports itself as a dialog, the page behind it
stops scrolling, the focus stays inside it so Tab cannot wander onto the page underneath, and
it is handed back to whatever held it once the drawer closes. Position decides which
edge the drawer comes from - End docks it to the other side, and the swipe that closes
it goes that way too - while NoScrollLock, NoFocusTrap and NoRestoreFocus
each give one of those three behaviors back. A panel with NoOverlay never covers the
page at all, so none of them apply to it. ShowCloseButton puts a close button in the
header for the screens the panel is a drawer on - where the toggle button, which collapses a
permanent panel into a rail, has nothing to do - so a touch user has something to aim at
besides the overlay and the swipe; CloseIcon, CloseIconName and
CloseAriaLabel describe it. Narrow the window below the breakpoint to see all of it.
StickyEnds
The panel scrolls as one by default, so a long list carries the header and the search box out
of sight along with it. StickyEnds hands the overflow to the items instead: the header
(with the box that filters them) and the footer stay where they are, and only the list between
them scrolls.
Color
External Icons
Size
Style & Class
RTL
API
Every parameter, public member, sub-class and enum this component exposes.
BitNavPanel parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| Accent | BitColor? | null | The accent color of the nav. |
| AllExpanded | bool | false | Expands all items on first render. |
| AutoFocus | bool | false | Moves the focus into the drawer of a small screen as it opens - onto the search box, or onto the first item of a panel without one. The column of a wide screen was on screen all along and takes nothing. |
| ChevronDownIcon | BitIconInfo? | null | The icon of the chevron-down element of each nav item, for icons of external libraries. It takes precedence over ChevronDownIconName. |
| ChevronDownIconName | string? | null | The custom icon name of the chevron-down element of each nav item. |
| Classes | BitNavPanelClassStyles? | null | Custom CSS classes for different parts of the nav panel. |
| CollapseAriaLabel | string? | null | The default aria-label of the expand/collapse button of an expanded item of the nav. |
| CloseAriaLabel | string? | null | The aria-label and the tooltip of the close button of the nav panel. |
| CloseIcon | BitIconInfo? | null | The icon of the close button of the nav panel. Takes precedence over CloseIconName when both are set. |
| CloseIconName | string? | null | The name of the icon of the close button of the nav panel. |
| Color | BitColor? | null | The general color of the nav. |
| DefaultSelectedItem | TItem? | null | The initially selected item of the nav in manual mode. |
| EmptyListTemplate | RenderFragment? | null | The custom template for when the search result is empty. |
| EmptyListMessage | string? | null | The custom message for when the search result is empty. |
| ExpandAriaLabel | string? | null | The default aria-label of the expand/collapse button of a collapsed item of the nav. |
| ExpandOnHover | bool | false | Expands the toggled (rail) nav panel back to its full width while the pointer is over it. |
| FitWidth | bool | false | Renders the nav panel with fit-content width. The width is then the items' rather than the panel's, so this is the one mode whose toggle resizes the panel in a single step instead of travelling between the two widths. |
| Footer | RenderFragment? | null | The custom template to render as the footer of the nav panel. |
| FullWidth | bool | false | Renders the nav panel with full (100%) width. |
| Header | RenderFragment? | null | The custom template to render as the header of the nav panel. |
| HeaderTemplate | RenderFragment<TItem>? | null | Used to customize how content inside the group header is rendered. |
| HeaderTemplateRenderMode | BitNavItemTemplateRenderMode | BitNavItemTemplateRenderMode.Normal | The render mode of the custom HeaderTemplate. |
| HideToggle | bool | false | Removes the toggle button. |
| IconAriaLabel | string? | null | The accessible name of the logo in the header of the nav panel: the name of the link an IconNavUrl wraps it in, and the alternative text of the image otherwise. Falls back to AriaLabel and then to a built-in name. |
| IconNavUrl | string? | null | Renders an anchor wrapping the icon to navigate to the specified url. |
| IconUrl | string? | null | The icon url to show in the header of the nav panel. |
| IndentValue | int | 16 | The indentation value in px for each level of depth of child item. |
| IndentPadding | int | 27 | The indentation padding in px for items without children (compensation space for chevron icon). |
| IndentReversedPadding | int | 4 | The indentation padding in px for items in reversed mode. |
| IsOpen | bool | false | Determines if the nav panel is open in small screens. |
| IsToggled | bool | false | Determines if the nav panel is in the toggled state. |
| Items | IList<TItem> | [] | A collection of items to display in the nav panel. |
| ItemTemplate | RenderFragment<TItem>? | null | Used to customize how content inside the item is rendered. |
| ItemTemplateRenderMode | BitNavItemTemplateRenderMode | BitNavItemTemplateRenderMode.Normal | The render mode of the custom ItemTemplate. |
| NameSelectors | BitNavNameSelectors<TItem>? | null | Names and selectors of the custom input type properties. |
| NavClasses | BitNavClassStyles? | null | Custom CSS classes for different parts of the nav component of the nav panel. |
| NavMatch | BitNavMatch? | null | Determines the global URL matching behavior of the nav. |
| NavMode | BitNavMode | BitNavMode.Automatic | Determines how the navigation will be handled. |
| NavStyles | BitNavClassStyles? | null | Custom CSS styles for different parts of the nav component of the nav panel. |
| NoAutoClose | bool | false | Keeps the nav panel open when an item with a URL is clicked, instead of closing it. |
| NoCollapse | bool | false | Disables and hides all collapse/expand buttons of the nav component. |
| NoFocusTrap | bool | false | Stops the open drawer of a small screen from holding the focus inside itself. The focus is only ever held while the panel covers the page, which is the state its overlay is rendered in. |
| NoOverlay | bool | false | Removes the overlay that is rendered behind the open nav panel in small screens. Without it the drawer no longer covers the page: it stops holding the focus and the page behind it keeps scrolling. |
| NoPad | bool | false | Disables the padded mode of the nav panel. |
| NoRestoreFocus | bool | false | Stops the closing drawer of a small screen from handing the focus back to the element that had it when the drawer opened. Only ever read by a panel that took the focus in the first place (see AutoFocus). |
| NoScrollLock | bool | false | Lets the page behind the open drawer of a small screen keep scrolling. The page is only ever held while the panel covers it, which is the state its overlay is rendered in. |
| NoSearchBox | bool | false | Removes the search box from the nav panel. |
| NoSwipe | bool | false | Disables the swipe gesture that closes the open nav panel in small screens. |
| NoToggle | bool | false | Disables the toggle feature of the nav panel. |
| OnItemClick | EventCallback<TItem> | Event fired up when an item is clicked. | |
| OnItemToggle | EventCallback<TItem> | Callback invoked when a group header is clicked and Expanded or Collapse. | |
| OnSearch | EventCallback<string?> | Callback invoked when the search text of the nav panel changes. | |
| OnSelectItem | EventCallback<TItem> | Callback invoked when an item is selected. | |
| Position | BitNavPanelPosition | BitNavPanelPosition.Start | The edge the off-canvas drawer of a small screen comes from, and the side it is docked to while it is open. It has no effect on a wide screen, where the panel is a column in the normal flow of the page. |
| RenderType | BitNavRenderType | BitNavRenderType.Normal | The way to render nav items. |
| Reselectable | bool | false | Enables recalling the select events when the same item is selected. |
| ReversedChevron | bool | false | Reverses the location of the expander chevron. |
| SearchBoxClasses | BitSearchBoxClassStyles? | null | Custom CSS classes for different parts of the search box of the nav panel. |
| SearchBoxPlaceholder | string? | null | The placeholder of the input element of the search box of the nav panel. |
| SearchBoxStyles | BitSearchBoxClassStyles? | null | Custom CSS styles for different parts of the search box of the nav panel. |
| SearchAnnouncementProvider | Func<int, string?>? | null | Builds the text that the screen reader announces through the live region of the nav panel whenever the search filters the items, in place of the built-in English announcement. The argument is the number of matched items. |
| SearchDebounceTime | int | 500 | The debounce time in milliseconds of the search box of the nav panel. |
| SearchFilter | Func<TItem, string, bool>? | null | The custom function to decide whether an item matches a search term, replacing the default matching over the text, the description and the data of an item. |
| SearchIcon | BitIconInfo? | null | The icon of the button that the collapsed (rail) nav panel shows in place of its search box. Takes precedence over SearchIconName when both are set. |
| SearchIconName | string? | null | The name of the icon of the button that the collapsed (rail) nav panel shows in place of its search box. |
| SearchText | string? | null | The search text of the nav panel that filters its items. |
| SelectedItem | TItem? | null | The selected item of the nav in manual mode. |
| SingleExpand | bool | false | Enables the single-expand mode in the BitNav. |
| ShowCloseButton | bool | false | Renders a close button in the header of the nav panel, on the screens the panel is an off-canvas drawer on. It is the control the toggle button is not: the toggle collapses a permanent panel into a rail, which a drawer that is either open or gone has no state for. |
| Size | BitSize? | null | The size of the nav items. |
| StickyEnds | bool | false | Pins the two ends of the nav panel - the header with its search box, and the footer - in place and scrolls only the items between them, instead of scrolling the whole panel as one. |
| Styles | BitNavPanelClassStyles? | null | Custom CSS styles for different parts of the nav panel. |
| ToggleAriaLabel | string? | null | The aria-label of the toggle button of the nav panel. |
| ToggledWidth | int | 0 | The width of the nav panel in px in its toggled (rail) state. |
| ToggleIcon | BitIconInfo? | null | The icon of the toggle button of the nav panel. It takes precedence over ToggleIconName. |
| ToggleIconName | string? | null | The name of the icon of the toggle button of the nav panel. |
| Top | int | 0 | The top CSS property value of the root element of the nav panel in px. |
| Width | int | 0 | The width of the nav panel in px. It is ignored in the FitWidth and FullWidth modes. |
BitNavPanel public members
| Name | Type | Default value | Description |
|---|---|---|---|
| ClearSearch | Task | Clears the search text of the nav panel, so the whole list of items is shown again. | |
| Close | Task | Closes the nav panel. | |
| CollapseAll | void | Collapses all items of the nav. | |
| CollapseItem | Task | Collapses an item of the nav, and does nothing when it is already collapsed. | |
| ExpandAll | void | Expands all items of the nav in non-SingleExpand mode. | |
| ExpandItem | Task | Expands an item of the nav, and does nothing when it is already expanded. | |
| FocusItem | ValueTask | Moves the focus to an item of the nav, opening the branches it is nested in when it is not rendered yet. | |
| FocusSearchBox | Task | Moves the focus to the search box of the nav panel, opening the panel out of its toggled state first when the search box is not on screen. | |
| IsItemExpanded | bool | Whether an item of the nav is currently expanded. | |
| Open | Task | Opens the nav panel. | |
| SelectItem | Task | Selects an item of the nav programmatically, exactly like a click on that item would in the manual mode. | |
| Toggle | Task | Toggles the nav panel if possible. | |
| ToggleItem | Task | Toggles an item of the nav. |
BitComponentBase parameters
| 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. |
| 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. |
| IsEnabled | bool | true | Gets or sets a value indicating whether the component is enabled and can respond to user interaction. |
| 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. |
BitComponentBase public members
| Name | Type | Default value | Description |
|---|---|---|---|
| UniqueId | Guid | Guid.NewGuid() | Gets the readonly unique identifier for the component's root element, assigned when the component instance is constructed. |
| RootElement | ElementReference | Gets the reference to the root HTML element associated with this component. |
BitNavPanelClassStyles properties
| Name | Type | Default value | Description |
|---|---|---|---|
| Overlay | string? | null | Custom CSS classes/styles for the overlay of the BitNavPanel. |
| Root | string? | null | Custom CSS classes/styles for the root element of the BitNavPanel. |
| Toggled | string? | null | Custom CSS classes/styles for the root element of the BitNavPanel when toggled. |
| Container | string? | null | Custom CSS classes/styles for the container of the BitNavPanel. |
| Header | string? | null | Custom CSS classes/styles for the header container of the BitNavPanel. |
| HeaderIcon | string? | null | Custom CSS classes/styles for the header icon of the BitNavPanel. |
| ToggleButton | string? | null | Custom CSS classes/styles for the toggle button of the BitNavPanel. |
| CloseButton | string? | null | Custom CSS classes/styles for the close button of the BitNavPanel. |
| SearchBox | string? | null | Custom CSS classes/styles for the search box of the BitNavPanel. |
| ToggleSearchButton | string? | null | Custom CSS classes/styles for the toggle search button of the BitNavPanel. |
| EmptyListMessage | string? | null | Custom CSS classes/styles for the empty list message of the BitNavPanel. |
| Nav | string? | null | Custom CSS classes/styles for the nav component of the BitNavPanel. |
BitNavNameSelectors<TItem> properties
| Name | Type | Default value | Description |
|---|---|---|---|
| AriaCurrent | BitNameSelectorPair<TItem, BitNavAriaCurrent?> | new(nameof(BitNavItem.AriaCurrent)) | The AriaCurrent field name and selector of the custom input class. |
| AriaLabel | BitNameSelectorPair<TItem, string?> | new(nameof(BitNavItem.AriaLabel)) | The AriaLabel field name and selector of the custom input class. |
| Class | BitNameSelectorPair<TItem, string?> | new(nameof(BitNavItem.Class)) | The Class field name and selector of the custom input class. |
| ChildItems | BitNameSelectorPair<TItem, List<TItem>?> | new(nameof(BitNavItem.ChildItems)) | The ChildItems field name and selector of the custom input class. |
| CollapseAriaLabel | BitNameSelectorPair<TItem, string?> | new(nameof(BitNavItem.CollapseAriaLabel)) | The CollapseAriaLabel field name and selector of the custom input class. |
| Data | BitNameSelectorPair<TItem, object?> | new(nameof(BitNavItem.Data)) | The Data field name and selector of the custom input class. |
| Description | BitNameSelectorPair<TItem, string?> | new(nameof(BitNavItem.Description)) | The Description field name and selector of the custom input class. |
| ExpandAriaLabel | BitNameSelectorPair<TItem, string?> | new(nameof(BitNavItem.ExpandAriaLabel)) | The ExpandAriaLabel field name and selector of the custom input class. |
| ForceAnchor | BitNameSelectorPair<TItem, bool?> | new(nameof(BitNavItem.ForceAnchor)) | The ForceAnchor field name and selector of the custom input class. |
| Icon | BitNameSelectorPair<TItem, BitIconInfo?> | new(nameof(BitNavItem.Icon)) | The Icon field name and selector of the custom input class. |
| IconName | BitNameSelectorPair<TItem, string?> | new(nameof(BitNavItem.IconName)) | The IconName field name and selector of the custom input class. |
| IsEnabled | BitNameSelectorPair<TItem, bool?> | new(nameof(BitNavItem.IsEnabled)) | The IsEnabled field name and selector of the custom input class. |
| IsExpanded | BitNameSelectorPair<TItem, bool?> | new(nameof(BitNavItem.IsExpanded)) | The IsExpanded field name and selector of the custom input class. |
| IsSeparator | BitNameSelectorPair<TItem, bool?> | new(nameof(BitNavItem.IsSeparator)) | The IsSeparator field name and selector of the custom input class. |
| Key | BitNameSelectorPair<TItem, string?> | new(nameof(BitNavItem.Key)) | The Key field name and selector of the custom input class. |
| Match | BitNameSelectorPair<TItem, BitNavMatch?> | new(nameof(BitNavItem.Match)) | The Match field name and selector of the custom input class. |
| Style | BitNameSelectorPair<TItem, string?> | new(nameof(BitNavItem.Style)) | The Style field name and selector of the custom input class. |
| Target | BitNameSelectorPair<TItem, string?> | new(nameof(BitNavItem.Target)) | The Target field name and selector of the custom input class. |
| Template | BitNameSelectorPair<TItem, RenderFragment<TItem>?> | new(nameof(BitNavItem.Template)) | The Template field name and selector of the custom input class. |
| TemplateRenderMode | BitNameSelectorPair<TItem, BitNavItemTemplateRenderMode?> | new(nameof(BitNavItem.TemplateRenderMode)) | The TemplateRenderMode field name and selector of the custom input class. |
| Text | BitNameSelectorPair<TItem, string?> | new(nameof(BitNavItem.Text)) | The Text field name and selector of the custom input class. |
| Title | BitNameSelectorPair<TItem, string?> | new(nameof(BitNavItem.Title)) | The Title field name and selector of the custom input class. |
| Url | BitNameSelectorPair<TItem, string?> | new(nameof(BitNavItem.Url)) | The Url field name and selector of the custom input class. |
| AdditionalUrls | BitNameSelectorPair<TItem, IEnumerable<string>?> | new(nameof(BitNavItem.AdditionalUrls)) | The AdditionalUrls field name and selector of the custom input class. |
BitIconInfo properties
| Name | Type | Default value | Description |
|---|---|---|---|
| Name | string? | null | Gets or sets the name of the icon. |
| BaseClass | string? | null | Gets or sets the base CSS class for the icon. For built-in Fluent UI icons, this defaults to "bit-icon". For external icon libraries like FontAwesome, you might set this to "fa" or leave empty. |
| Prefix | string? | null | Gets or sets the CSS class prefix used before the icon name. For built-in Fluent UI icons, this defaults to "bit-icon--". For external icon libraries, you might set this to "fa-" or leave empty. |
BitColor enum
| Name | Value | Description |
|---|---|---|
| Primary | 0 | Info Primary general color. |
| Secondary | 1 | Secondary general color. |
| Tertiary | 2 | Tertiary general color. |
| Info | 3 | Info general color. |
| Success | 4 | Success general color. |
| Warning | 5 | Warning general color. |
| SevereWarning | 6 | SevereWarning general color. |
| Error | 7 | Error general color. |
| PrimaryBackground | 8 | Primary background color. |
| SecondaryBackground | 9 | Secondary background color. |
| TertiaryBackground | 10 | Tertiary background color. |
| PrimaryForeground | 11 | Primary foreground color. |
| SecondaryForeground | 12 | Secondary foreground color. |
| TertiaryForeground | 13 | Tertiary foreground color. |
| PrimaryBorder | 14 | Primary border color. |
| SecondaryBorder | 15 | Secondary border color. |
| TertiaryBorder | 16 | Tertiary border color. |
BitSize enum
| Name | Value | Description |
|---|---|---|
| Small | 0 | The small size. |
| Medium | 1 | The medium size. |
| Large | 2 | The large size. |
BitVisibility enum
| Name | Value | Description |
|---|---|---|
| Visible | 0 | The content of the component is visible. |
| Hidden | 1 | The content of the component is hidden, but the space it takes on the page remains (visibility:hidden). |
| Collapsed | 2 | The component is hidden (display:none). |
BitDir enum
| Name | Value | Description |
|---|---|---|
| Ltr | 0 | Ltr (left to right) is to be used for languages that are written from the left to the right (like English). |
| Rtl | 1 | Rtl (right to left) is to be used for languages that are written from the right to the left (like Arabic). |
| Auto | 2 | Auto lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then applies that directionality to the whole element. |
Feedback
Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.