App Container
Last updated: 3.0.0 (04/07/2024)
Last updated
Was this helpful?
Last updated: 3.0.0 (04/07/2024)
Last updated
Was this helpful?
This component has changed dramatically in Valence 3! .
The AppContainer
is an all-in-one component that creates a container in which the content of the app resides. It is designed to adapt responsively across all device classes to provide a consistent yet tailored experience.
Above is a minimum example, and there are many other props and options to break down about this component.
nav
propThis change allows greater flexibility in layout and design choices.
nav
ReactNode
The primary root navigation element; this should be consistent across pages.
showNav
boolean
Whether to show the nav
element. Defaults to true
.
3.0.0: Moved the App Container from @valence-ui/app
to @valence-ui/core
. This component has also received significant updates:
header
and sidebar
are no longer accepted as a prop; sidebars are no longer supported and it is the responsibility of the page content to handle any headers.
The App Container also no longer handles centering page content; this is now the responsibility of the page to do this.
The nav
prop allows you to insert an element, and will render it down the left of the screen (or on the bottom on mobile
breakpoints). It can be hidden by setting the showNav
prop to false
.
As of Valence 3, the App Container no longer handles default page width within the component, instead handing this responsibility off to the developer. To achieve a similar effect to what could be done in Valence 2, use a component:
Extends & .