StickyBar
Baseβ
Initial value and state controlβ
Use the defaultHide
property to provide an initial state (whether closed or not) to the uncontrolled StickyBar
, or use the hide
property to manage the value in a controlled way.
Not controlledβ
Controlledβ
You must create a state to manage visibility through the hide
property when using the StickyBar
controlled.
Without the close buttonβ
Use the irremovable
property to remove the close button from the StickyBar
.
Even without the close button you can control the visibility of the StickyBar
normally through the hide
property.
Sectionsβ
Use the StickyBar.Section
subcomponent to partition the contents of the StickyBar
into different sections.
Fluidβ
Use the fluid
property to expand the section across all available horizontal space.
Stretchedβ
Use the stretch
property to expand the section to the vertical limits of the StickyBar
.
Fluid and stretchedβ
You can use the fluid
and stretch
properties at the same time if necessary.
Customizationβ
Use the backgroundColor
property to add a custom background color to StickyBar
.
In addition, use the hook useStickyBar
to obtain colors with appropriate contrast for the background color of the StickyBar
.
Composition with other layout componentsβ
Use the StickyBarGroup
component to appropriately position one or more StickyBar
in the top corner of the page.
The styles of StickyBarGroup
automatically interact with the styles of Navbar, Sidebar and Main to compose a layout pattern for pages. Since version 8.14.0
this behavior also works when these components are separated into different micro frontends.
Uses the disabledAutoPositioning
property to disable automatic positioning of the component.
This property can be useful in scenarios where the page layout will be organized by an external library or some custom style.