PivotSelector
Description
A control to select a pivot
PivotSelector is a variation of the Pivot component that uses a Dropdown for navigation. It is particularly effective for mobile-first designs or interfaces with a large number of tabs that would otherwise require excessive horizontal scrolling.
Samples
Basic PivotSelector
PivotSelector with custom buttons
PivotSelector with large number of tabs
API reference
public class PivotSelector : IComponent, ISpecialCaseStyling, IBindableComponent<string>A standalone tab-selector strip that drives an external Pivot, used when the strip needs to be positioned independently of its panels.
- Namespace
- Tesserae
- Implements
- IComponent, ISpecialCaseStyling, IBindableComponent<string>
Constructors
| Name | Description |
|---|---|
| PivotSelector | Initializes a new instance of this class. |
Properties
| Name | Description |
|---|---|
| StylingContainer | Gets the HTMLElement that should receive styling. Exposing the root as the styling container (via ISpecialCaseStyling) lets sizing helpers like .S() / .Grow() write directly onto the selector instead of an extra wrapper when it is placed inside a Stack or Grid, matching the pivot family. |
| PropagateToStackItemParent | Gets whether styling should propagate to the stack item parent. |
public HTMLElement StylingContainer { get; }Gets the HTMLElement that should receive styling. Exposing the root as the styling container (via ISpecialCaseStyling) lets sizing helpers like .S() / .Grow() write directly onto the selector instead of an extra wrapper when it is placed inside a Stack or Grid, matching the pivot family.
Methods
| Name | Description |
|---|---|
| OnBeforeNavigate | Registers a callback invoked when the before navigate event fires. |
| OnNavigate | Registers a callback invoked when the navigate event fires. |
| SetCommands | Sets the commands of the component. |
| Select | Configures the component to select. |
| AsObservable | Returns an observable that tracks the id of the currently-selected tab. |
| SetBoundValue | Programmatically selects a tab by id as part of a two-way binding. |
| Render | Renders the component's root HTML element. |
public PivotSelector SetCommands(params IComponent[] commands)Sets the commands of the component.
public PivotSelector Select(string id, bool refresh = false)Configures the component to select.
public IObservable<string> AsObservable()Returns an observable that tracks the id of the currently-selected tab.
public void SetBoundValue(string value)Programmatically selects a tab by id as part of a two-way binding.