limestone/Panels
Panels provides a way to manage different screens of an app.
Members
Section titled “Members ”Panels Component
Section titled “Panels   Component ”Basic Panels component without a default ui/ViewManagerui/ViewManager.Arranger
Properties
arranger
Section titled “arranger”Set of functions that control how the panels are transitioned into and out of the viewport.
Default: ui/ViewManager.SlideLeftArrangerbackButtonAriaLabel
Section titled “backButtonAriaLabel”Hint string read when focusing the back button.
Default: 'go to previous'Background opacity of the application back button.
Default: 'transparent'children
Section titled “children”limestone/Panelslimestone/Panels.Panel to be rendered
closeButtonAriaLabel
Section titled “closeButtonAriaLabel”Hint string read when focusing the application close button.
Default: 'Exit app'Background opacity of the application close button.
Default: 'transparent'Customizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component.
The following classes are supported:
panels- The root class nameviewport- The node containing the panel instances
Unique identifier for the Panels instance.
When defined, Panels will manage the presentation state of Panel instances in order
to restore it when returning to the Panel. See
limestone/Panelslimestone/Panels.Panels.noSharedState for more details on shared
state.
Index of the active panel
Default: 0noAnimation
Section titled “noAnimation”Disables panel transitions.
Default: falsenoBackButton
Section titled “noBackButton”Omits the back button.
Default: falsenoCloseButton
Section titled “noCloseButton”Omits the close button.
Default: falsenoSharedState
Section titled “noSharedState”Prevents maintaining shared state for framework components within this Panels instance.
When false, each Panel will track the state of some framework components in order to
restore that state when the Panel is recreated. For example, the scroll position of a
limestone/Scroller within a Panel will be saved and restored when returning to that
Panel.
This only applied when navigating "back" (to a lower index) to Panel. When navigating
"forwards" (to a higher index), the Panel and its contained components will use their
default state.
onBack
Section titled “onBack”Called with cancel/back key events.
onClose
Section titled “onClose”Called when the app close button is clicked.
onTransition
Section titled “onTransition”Called once when all panels have completed their transition.
onWillTransition
Section titled “onWillTransition”Called once before panels begin their transition.
Header Component
Section titled “Header   Component ”A header component for a Panel with a title and subtitle, supporting several configurable
ui/Slottableui/Slottable.Slottable for components.
Properties
backButtonAriaLabel
Section titled “backButtonAriaLabel”Sets the hint string read when focusing the back button.
Default: 'go to previous'Background opacity of the application back button.
Default: 'transparent'centered
Section titled “centered”Centers the contents of the Header.
This setting does not affect slotBefore or slotAfter.
Children provided are added to the header-components area.
A space for controls which live in the header, apart from the body of the panel view.
closeButtonAriaLabel
Section titled “closeButtonAriaLabel”Hint string read when focusing the application close button.
Default: 'Exit app'Background opacity of the application close button.
Default: 'transparent'Customizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component.
The following classes are supported:
header- The root class name
Determines what triggers the header content to start its animation.
Default: 'render'noBackButton
Section titled “noBackButton”Omits the back button.
Default: falsenoCloseButton
Section titled “noCloseButton”Omits the close button.
Default: falsenoSubtitle
Section titled “noSubtitle”Omits the subtitle area.
Default: falseonBack
Section titled “onBack”Called with cancel/back key events.
onClose
Section titled “onClose”Called when the app close button is clicked.
shadowed
Section titled “shadowed”Adds shadow to the text contents.
slotAbove
Section titled “slotAbove”A location for arbitrary elements to be placed above the title
This is a ui/Slottableui/Slottable.Slottable, so it can be used as a tag-name inside this component.
<Header>
<slotAbove><Button /></slotAbove>
<title>My Title</title>
</Header>slotAfter
Section titled “slotAfter”A location for arbitrary elements to be placed to the right the title in LTR locales and to the left in RTL locales
This is a ui/Slottableui/Slottable.Slottable, so it can be used as a tag-name inside this component.
<Header>
<title>My Title</title>
<slotAfter><Button /></slotAfter>
</Header>slotBefore
Section titled “slotBefore”A location for arbitrary elements to be placed to the left the title in LTR locales and to the right in RTL locales
This is a ui/Slottableui/Slottable.Slottable, so it can be used as a tag-name inside this component.
<Header>
<slotBefore><Button /></slotBefore>
<title>My Title</title>
</Header>Text displayed below the title.
This is a ui/Slottableui/Slottable.Slottable, so it can be used as a tag-name inside
this component.
If limestone/Panelslimestone/Panels.Header.noSubtitle is true, this prop is ignored.
Title of the header.
This is a ui/Slottableui/Slottable.Slottable, so it can be used as a tag-name inside this component.
Example:
<Header>
<title>Example Header Title</title>
<subtitle>The Adventure Continues</subtitle>
</Header>Set the type of header to be used.
Default: 'standard'Panel Component
Section titled “Panel   Component ”A Panel is the standard view container used inside a limestone/Panelslimestone/Panels.Panels view manager instance.
limestone/Panelslimestone/Panels.Panels will typically contain several instances of these and transition between them.
Properties
aria-label
Section titled “aria-label”The "aria-label" for the Panel.
By default, the panel will be labeled by its limestone/Panelslimestone/Panels.Header.
When aria-label is set, it will be used instead to provide an accessibility label for
the panel.
Obtains a reference to the root node.
Customizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component.
The following classes are supported:
panel- The root class namebody- The node containing the panel's children
header
Section titled “header”Header for the panel.
This is usually passed by the ui/Slottableui/Slottable.Slottable API by using a limestone/Panelslimestone/Panels.Header component as a child of the Panel.
hideChildren
Section titled “hideChildren”Hides the body components.
When a Panel is used within limestone/Panelslimestone/Panels.Panels this property will
be set automatically to true on render and false after animating into view.
Sets the strategy used to automatically focus an element within the panel upon render.
"none" - Automatic focus is disabled
"last-focused" - The element last focused in the panel with be restored
"default-element" - The first spottable component within the body will be focused
Custom Selector - A custom CSS selector may also be provided which will be used to find the target within the Panel
When used within limestone/Panelslimestone/Panels.Panels, this prop may be set by
Panels to "default-element" when navigating "forward" to a higher index. This behavior
may be overridden by setting autoFocus on the Panel instance as a child of Panels
or by wrapping Panel with a custom component and overriding the value passed by
Panels.
// Panel within CustomPanel will always receive "last-focused"
const CustomPanel = (props) => <Panel {...props} autoFocus="last-focused" />;
// The first panel will always receive "last-focused". The second panel will receive
// "default-element" when navigating from the first panel but `autoFocus` will be unset
// when navigating from the third panel and as a result will default to "last-focused".
const MyPanels = () => (
<Panels>
<Panel autoFocus="last-focused" />
<Panel />
<Panel />
</Panels>
);Default: 'last-focused'noSharedState
Section titled “noSharedState”Prevents the component from restoring any framework shared state.
When false, the default, Panel will store state for some framework components in order to
restore that state when returning to the Panel. Setting this prop to true will suppress that
behavior and not store or retrieve any framework component state.
spotlightId
Section titled “spotlightId”The container id for spotlight/SpotlightContainerDecorator/#SpotlightContainerDecoratorspotlight/SpotlightContainerDecorator/#SpotlightContainerDecorator.spotlightId.
When the Panel is used within limestone/Panelslimestone/Panels.Panels, this prop will be
generated by Panels. When using the panel alone, you need to specify this prop for restoring focus.
PanelDecorator Higher-Order Component
Section titled “PanelDecorator   Higher-Order Component ”Applies Limestone specific behaviors to limestone/Panelslimestone/Panels.Panel.PanelBase components.
Includes:
spotlight/SpotlightContainerDecoratorspotlight/SpotlightContainerDecorator.SpotlightContainerDecorator
Includes:
ui/Slottableui/Slottable.Slottable
Includes:
limestone/Skinnablelimestone/Skinnable.Skinnable
Routable Higher-Order Component
Section titled “Routable   Higher-Order Component ”A higher-order component that provides support for mapping Routes as children of a component
which are selected via path instead of the usual flat array.
Route Component
Section titled “Route   Component ”Used with limestone/Panelslimestone/Panels.Routable to define the path segment and the
component to render.
Extends:
ui/Routableui/Routable.Route