Skip to main content
Give us your valuable feedback

It will help us understand how we can serve you better

Give feedback


Tab Bar

Displays a tab bar to switch different views

banner-Tab Bar
Component Status Details

Status component contains a list of checks and completeness that has been tested and owned by each component

We don't use color as the only visual tool to convey information.
The component’s structure and properties include relevant options such as variant, style, size, orientation, optional iconography, decorations, selection, error state, etc. The title is the component name that uses the frame base component template. The base component name contains: .Base & "Component Name" if there is more than one. All component properties use the Legion foundation.
We can change all the parts that are connected to the component base. The inside of the base component remains connected to the master component. All variant options are not damaged when we change from one to another. Overriding changes to components will not reset other variants.
Component's already has component specs documentation.



Upcoming Upcoming

Tabs organize content across different screens, data sets, and other interactions.


You can implement Tabs by using this tag LgnTabLayout in xml file.


You can alse customize the Tabs in the fragment or activity from Kotlin file .

Tabs adapter

class CommonPagerAdapters(
fragment: Fragment,
val data: List<Fragment>
) : FragmentStateAdapter(fragment) {
override fun getItemCount(): Int {
return data.size

Activity or Fragment file

with(binding) {
// Configure ViewPager2 with Adapter
vpBase.adapter = CommonPagerAdapters(listFragment)
// Attach Tab to ViewPager2
TabLayoutMediator(this, viewPager2) { tab, position ->
tab.text = label[position]


Attribute NameXml AttrsRelated method(s)Description
Tab indicator colorapp:tabIndicatorColorsetSelectedTabIndicatorColor()Change Tab indicator color
Tab indicatorapp:tabIndicatorsetSelectedTabIndicatorColor()Change Tab indicator
Tab indicator gravityapp:tabIndicatorGravitysetSelectedTabIndicatorGravity()Change Tab indicator gravity
Tab indicator animation modeapp:tabIndicatorAnimationMode.tabIndicatorAnimationModeChange Tab indicator animation mode
Tab modeapp:tabMode.tabModeChange Type of Tab Style
Tab inline labelapp:tabInlineLabel.isInlineLabelChange Tab Label Position to Inline
Tab text colorsapp:tabTextColor.tabTextColorsChange Tab Text Color State Not Selected
Tab text colors selectedapp:tabSelectedTextColor.tabTextColorsChange Tab Text Color State Not Selected
Tab paddingapp:tabPaddingN/AChange Tab all padding
Tab padding startapp:tabPaddingStartN/AChange Tab start padding
Tab padding topapp:tabPaddingTopN/AChange Tab top padding
Tab padding endapp:tabPaddingEndN/AChange Tab end padding
Tab padding bottomapp:tabPaddingBottomN/AChange Tab bottom padding
Tab text appreanceapp:tabTextAppearanceN/AChange Tab text apreance
Tab backgroundapp:tabBackgroundN/AChange Tab background
Tab indicator animation durationapp:tabIndicatorAnimationDurationN/AChange Tab indicator animation duration]