Sidebar
Importβ
import { Sidebar } from '@resultadosdigitais/tangram-components'
Propertiesβ
childrenβ
disableAutoPositioningβ
| Type | bool |
|---|---|
| Default | false |
Descriptionβ
Disables automatic positioning of the component.
If this property is true, the component positioning must be provided by some external means.
collapsibleβ
closeβ
defaultCloseβ
closeLabelTextβ
| Type | string |
|---|---|
| Default | Sidebar.translations.en.close |
Descriptionβ
Custom text for the label that identifies the close icon
for the collapsible Sidebar. This text is not displayed on the screen.
Preset values for English, Brazilian Portuguese and Spanish are available
in Sidebar.translations.en.close,
Sidebar.translations.ptBR.close and
Sidebar.translations.es.close.
openLabelTextβ
| Type | string |
|---|---|
| Default | Sidebar.translations.en.open |
Descriptionβ
Custom text for the label that identifies the open icon
for the collapsible Sidebar. This text is not displayed on the screen.
Preset values for English, Brazilian Portuguese and Spanish are available
in Sidebar.translations.en.open,
Sidebar.translations.ptBR.open and
Sidebar.translations.es.open.
onChangeβ
| Type | func |
|---|---|
| Param | event React.SyntheticEvent - The event source of the callback. |
| Param | isClose boolean - Boolean value indicating whether the Sidebar is closed. |
Descriptionβ
Callback fired when the collapsible Sidebar
changes from open to closed or closed to open.
positionRelativeToβ
| Type | string | shape | instanceOf |
|---|---|
| Default | null |
Descriptionβ
Element (or reference to an element) that the Sidebar should be positioned relative to.
Accepts:
- a
string(element id) - a ref object (
{ current: Element }) - an
Element
When provided, the Sidebar will be positioned fixed relative to this element,
positioned to the left and top of the referenced element.
<SidebarFooter />β
Importβ
import { SidebarFooter } from '@resultadosdigitais/tangram-components'
Propertiesβ
childrenβ
<SidebarHeader />β
Importβ
import { SidebarHeader } from '@resultadosdigitais/tangram-components'
Propertiesβ
childrenβ
<SidebarLabel />β
Importβ
import { SidebarLabel } from '@resultadosdigitais/tangram-components'
Propertiesβ
childrenβ
Feedbackβ
To report a problem or suggest changes, use our improvements form or, if you prefer, open an issue on our Github repository.