Skip to content
On this page

Tabs

A tab bar for navigating between related content panels.

Tabs in FluttyUITabs in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

Tabs

const Tabs({
  super.key,
  required this.tabs,
  this.size,
  this.initialIndex = 0,
  this.selectedIndex,
  this.onChanged,
  this.isScrollable = false,
  this.alignment = MainAxisAlignment.start,
  this.indicatorColor = const Color(0xFF006FEE),
  this.labelColor,
  this.unselectedLabelColor,
  this.indicatorHeight = 2,
  this.tabPadding,
  this.tabBarPadding,
  this.tabBarColor,
  this.selectedTabColor,
  this.tabBarRadius,
  this.tabOverlap = TabBarStyle.overlap,
  this.contentPadding = EdgeInsets.zero,
  this.contentSpacing,
  this.animationDuration,
  this.showIndicator = false,
  this.showDivider = false,
});
ParameterTypeRequiredDefault
keyKey?Nonull
tabsList<TabItem>Yes—
sizeComponentSize?Nonull
initialIndexintNo0
selectedIndexint?Nonull
onChangedValueChanged<int>?Nonull
isScrollableboolNofalse
alignmentMainAxisAlignmentNoMainAxisAlignment.start
indicatorColorColorNoconst Color(0xFF006FEE)
labelColorColor?Nonull
unselectedLabelColorColor?Nonull
indicatorHeightdoubleNo2
tabPaddingEdgeInsetsGeometry?Nonull
tabBarPaddingEdgeInsetsGeometry?Nonull
tabBarColorColor?Nonull
selectedTabColorColor?Nonull
tabBarRadiusdouble?Nonull
tabOverlapdoubleNoTabBarStyle.overlap
contentPaddingEdgeInsetsGeometryNoEdgeInsets.zero
contentSpacingdouble?Nonull
animationDurationDuration?Nonull
showIndicatorboolNofalse
showDividerboolNofalse

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/navigation/tabs/tabs.dart

This reference is generated from the Tabs declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI