0.0.2 • Published 8 months ago

@licuido-ui/ui_bottom-tab v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

BottomTab

The BottomTab component is a customizable bottom navigation bar for React applications. It provides a user-friendly way to navigate between different sections or pages of the application. The navigation bar consists of a set of icons, and optionally, labels can be displayed alongside the icons to provide additional context.

Author

Link

Story Book Link ButtonGroup

PlayGround

Try it have a fun codeBox

Installation

npm i @licuido-ui/ui_bottom-tab

Import component

import { BottomTab } from '@licuido-ui/ui_bottom-tab';

Usage

<BottomTab  items={[]} />

Image

bottomTab

Sample code

<BottomTab
  items={[
    {
      icon: 'icon1.png',
      label: 'Home',
    },
    {
      icon: 'icon2.png',
      label: 'Profile',
    },
  ]}
  onClick={handleClick}
  variant='withLabel'
  iconActiveBgColor='#ff0000'
  iconInActiveBgColor='#cccccc'
  labelActiveColor='#000000'
  labelInActiveColor='#999999'
  activeFontWeight='bold'
  inActiveFontWeight='normal'
  iconHeightPng='32px'
  iconWidthPng='32px'
  elevation={2}
/>

Props

BottomTab Props

NameTypeDescription
idstringstring
classNamestringAdditional CSS class for styling the component.
sxSxPropsCustom style prop for using MUI's sx prop.
itemsNavbarItem[]An array of objects representing each item in the bottom tab bar.
onClick(item: NavbarItem) => voidEvent handler for when an item is clicked. It receives the clicked NavbarItem as an argument.
iconActiveBgColorstringBackground color of the active icon.
iconInActiveBgColorstringBackground color of the inactive icon.
labelActiveColorstringColor of the label text when the item is active.
labelInActiveColorstringColor of the label text when the item is inactive.
rootStyleobjectAdditional custom style for the root container.
listStyleobjectAdditional custom style for the list container.
iconStyleobjectAdditional custom style for the icon container.
labelStyleobjectAdditional custom style for the label text.
variant'withLabel' | 'withoutLabel'Variant to display the bottom tab bar with or without labels.
itemStyleobjectAdditional custom style for each individual item container.
inActiveFontWeightstring | numberFont weight of the label text when the item is inactive.
activeFontWeightstring | numberFont weight of the label text when the item is active.
isDisableRippletrue | falseWhether to disable the ripple effect on item click.
elevationnumberElevation level of the bottom tab bar.
iconHeightPngnumber | stringHeight of the icon when it's in PNG format.
iconWidthPngnumber | stringWidth of the icon when it's in PNG format.