BottomNavigation
The bottom navigation bar component.
Importing
ts
import "@tapsioss/web-components/bottom-navigation";
ts
import { BottomNavigation } from "@tapsioss/react-components/BottomNavigation";
Component Usage
html
<tapsi-bottom-navigation></tapsi-bottom-navigation>
tsx
<BottomNavigation />
Properties
Name | Description | Type | Default Value |
---|---|---|---|
label | Defines a string value that can be used to set a label for assistive technologies. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label | string | - |
Slots
Name | Description |
---|---|
- | The default slot for navigation items. |
TIP
You can use slot names as variables:
ts
import { Slots } from "@tapsioss/web-components/bottom-navigation";
console.log(Slots.DEFAULT); // ""
ts
import { BottomNavigationSlots } from "@tapsioss/react-components";
console.log(BottomNavigationSlots.DEFAULT); // ""
Events
Name | Description | Type |
---|---|---|
activechange | Fired when the items activation state changes (Bubbles). | ActiveChangeEvent |
TIP
You can import custom event names:
ts
import {
ActiveChangeEvent
} from "@tapsioss/web-components/bottom-navigation";
element.addEventListener(ActiveChangeEvent.type, handleTapsiBottomNavigationActiveChange);
tsx
import {
BottomNavigationActiveChangeEvent
} from "@tapsioss/react-components";
// ...
<BottomNavigation
onActiveChangeEvent={(e: BottomNavigationActiveChangeEvent) => {...}}
/>