@element-public/react-bottom-app-bar
v5.68.10-alpha.1
Published
Bottom App Bar component for Element React
Keywords
Readme
BottomAppBar
Description
Bottom App Bar organize content across different screens, data sets, and other interactions. The Bottom App Bar contains the Bottom Tab Scroller and Tab components for the bottom.
See live demos on storybook
Install from Artifactory
- Verify that you have access to (https://docs.int.bayer.com/cloud/devops/artifactory/)[Bayer Artifactory]
- Verify your token is correctly set up in your .npmrc as per the link above
- Verify you have the @element scope configured in your .npmrc
@element:registry=https://artifactory.bayer.com/artifactory/api/npm/npm-platforms-engineering/
- Install the component and themes bundles
npm i @element/react-components @element/themes- alternatively install the component individually along with the themes bundle
npm i @element/react-bottom-app-bar @element/themes
- alternatively install the component individually along with the themes bundle
Notes
Bottom App Bar is a navigation-bar component placed on the bottom of the page displayed normally on mobile devices. Could be used in RWD pages.
Bottom App Bar Props
| Name | Type | Default | Required | Description | | -------------- | ------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | | activeTabIndex | number | 0 | false | Index of the currently active tab. | | className | string | undefined | false | The css class name to be passed through to the component markup. | | elevated | boolean | false | false | Apply elevated styles to raise the tab-bar above standard content. | | variant | string | 'surface' | false | Background theme color. Accepts one of 'primary', 'secondary', or 'surface'.Accepted Values: primary, secondary, surface |
Bottom App Bar Deprecated Props
| Name | Type | Default | Required | Deprecated | Description | | ---------- | ------- | --------- | -------- | -------------------------------------------------- | ------------------------------------------- | | raised | boolean | undefined | false | Please use elevated instead. | Apply a raised style. | | scrollable | boolean | undefined | false | Deprecated, containers will scroll when necessary. | Create a fixed height scrollable container. |
Bottom App Bar Render Props
| Name | Type | Default | Required | Description | | -------- | --------------- | ------- | -------- | ----------------------------------- | | children | React.ReactNode | null | false | Accepts one or more Tab components. |
Bottom App Bar Events
| Name | Default | Required | Params | Description | | -------------- | --------- | -------- | ------ | ---------------------------------------- | | onTabActivated | undefined | false | | Fires when switching to a different tab. |
Bottom App Indicator Props
| Name | Type | Default | Required | Description | | --------- | ------- | --------- | -------- | ---------------------------------------------------------------------- | | active | boolean | false | false | Visually activates the indicator. | | className | string | undefined | false | The css class name to be passed through to the component markup. | | icon | string | null | false | The bottom-tab-indicator will use an underline if no icon is provided. | | id | string | undefined | false | The id to be passed through to the component markup. |
Bottom App Scroller Props
| Name | Type | Default | Required | Description | | --------- | ------ | --------- | -------- | ---------------------------------------------------------------- | | className | string | undefined | false | The css class name to be passed through to the component markup. |
Bottom App Scroller Render Props
| Name | Type | Default | Required | Description | | -------- | --------------- | ------- | -------- | ----------------------------- | | children | React.ReactNode | null | false | Accepts BottomTab components. |
Bottom Tab Props
| Name | Type | Default | Required | Description | | ------------- | ------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | active | boolean | undefined | false | Indicates that the tab is active. | | className | string | undefined | false | The css class name to be passed through to the component markup. | | indicatorIcon | string | null | false | An icon to be used as the tab indicator. Accepts the name of any valid material icon (see Icon component documentation for a list of valid icons). If no icon is provided the tab-indicator will use an underline. |
Bottom Tab Render Props
| Name | Type | Default | Required | Description |
| -------- | --------------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| children | React.ReactNode | null | false | The displayed content. Expects a valid string, though will accept any valid components or markup. If label and children are both set, label will take priority. |
| icon | React.ReactNode | undefined | false | Add a leading icon to the tab. |
| label | React.ReactNode | null | false | The displayed text. Expects a valid string. If label and children are both set, label will take priority. |
