Tabs
IzzyBlazor.Tabs in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.17 assembly
and its doc comments.
Properties (10)
@bind-Selectedstring? (computed)The selected tab's Value. Defaults to the first tab that isn't disabled.
Labelstring?The tab list's (or the TabLinks' nav's) name for screen readers, such as "Account settings".
QueryKeystring?Keeps the selected tab in the URL under this query-string key, such as tab: a link to ?tab=billing opens that tab, and with JavaScript switching tabs updates the URL.
VariantTabsVariant = TabsVariant.LineHow the tabs look. Defaults to TabsVariant.Line.
SizeControlSize = ControlSize.MdTab height and text size, shared with buttons and fields. Defaults to ControlSize.Md.
FullWidthbool = falseStretches the tabs to share the full width (or, vertical, the list's width).
Padding on every side of each panel, in spacing steps, in place of the default space above and below (the default has none at the sides). 0 lets content such as a table run edge to edge. A Tab can set its own.
OrientationOrientation = Orientation.HorizontalA row above the panels (the default), or a column beside them from 640px up. Vertical tabs stay a scrolling row on phones, where a column would crowd the content.
Idstring?The element id; tab and panel ids build on it. Generated when not set.
ChildContentRenderFragment?The Tabs.
Item props (from LayoutItemBase)
Margin on all sides, in spacing steps (-16 to 16; one step = 4px).
Width.
Minimum width.
Maximum width.
Growbool = falseWhether to grow into free space inside a Stack, Row or Column: <Box Grow>.
Shrinkbool = trueWhether to shrink when space is short inside a Stack, Row or Column. Defaults to true; Shrink="false" keeps the size.
Starting size inside a Stack, before growing or shrinking.
Alignment across the parent's direction, overriding the parent's Align for this component only, such as a button lined up with the bottom of labeled fields in a Row.
Common props (from IzzyComponentBase)
Classstring?Extra CSS classes, merged after the component's own classes.
Stylestring?Inline style, appended after the component's generated custom properties.
VisibleFromBreakpoint?Shows the component only from this breakpoint up, such as header links for wide screens.
Events (0)
No events.
Parts (2)
Components written inside Tabs, documented here with it.
Tab
One tab of a Tabs: its label goes in the tab list and its content in a panel. All panels are rendered; CSS shows the selected one.
Labelstring requiredThe label in the tab list.
Valuestring? (computed)The value that identifies this tab in @bind-Selected and in the URL. Defaults to the title in lower case with dashes, such as billing-history. Tabs that end up with the same value get -2, -3... added.
IconIconData?An icon before the label.
Badgestring?A small count or label after the title, such as "3".
Disabledbool = falseShows the tab but stops it being selected.
Padding inside this tab's panel, in spacing steps, in place of the tabs' ContentPadding.
ChildContentRenderFragment?The panel content.
Plus 4 common props.
TabLink
A tab that's a link to its own page, for sections split across routes (/settings/profile, /settings/billing). A Tabs holding TabLinks renders a nav of real links: no script, no panels, and the tab for the current page is marked from the URL on the server. Don't mix TabLinks with Tabs that have panels.
Hrefstring requiredThe page the tab links to.
Labelstring requiredThe tab's text.
IconIconData?An icon before the label.
Badgestring?A small count or label after the text, such as "3".
Disabledbool = falseShows the tab but not as a link.
MatchNavLinkMatch = NavLinkMatch.PrefixHow the current URL must match Href for the tab to be selected. Prefix (the default) also selects it on pages below it. A link with a query string (?tab=billing) is selected only when the current query string is the same, and then a tab whose link has no query isn't, so tabs for one page told apart by the query select one at a time.
Currentbool?Marks the tab current (true) or not (false) whatever the URL, for a choice the page knows from elsewhere, such as a cookie. Unset (the default): from the URL, by Match, unless another tab is set current. A current tab set this way has aria-current="true" (a choice, not necessarily this page); a disabled tab is never current.
Types (3)
ControlSize
enumThe height of interactive controls. Shared by buttons and form fields, so a button and an input of the same size line up in a row.
| Value | Description |
|---|---|
Sm | 32px tall, small text. |
Md | 36px tall (the default). |
Lg | 44px tall, large text. For touch-first and marketing pages. |
Orientation
enumWhether items run across or down.
| Value | Description |
|---|---|
Vertical | Top to bottom. |
Horizontal | Side by side, wrapping when space runs out. |
TabsVariant
enumHow Tabs draw their tab list.
| Value | Description |
|---|---|
Line | A line under the list, with the selected tab underlined (the default). |
Soft | The selected tab gets a soft accent background. |
Segmented | A segmented control: the tabs sit in a tray and the selected one is raised. |