Skip to content
On this page

MorphTabs

A tab interface with animated transitions between content.

MorphTabs in FluttyUIMorphTabs 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.

MorphTabs

const MorphTabs({
  super.key,
  required this.tabs,
  this.size,
  this.initialIndex = 0,
  this.selectedIndex,
  this.onChanged,
  this.enabled = true,
  this.swipeable = true,
  this.swipeThreshold = .2,
  this.lazy = true,
  this.barPosition = MorphTabsBarPosition.top,
  this.contentHeight,
  this.contentSpacing,
  this.height,
  this.iconSize,
  this.fontSize,
  this.spacing = 0,
  this.iconLabelSpacing,
  this.barPadding,
  this.barDecoration,
  this.backgroundColor,
  this.selectedBackgroundColor,
  this.foregroundColor,
  this.selectedForegroundColor,
  this.selectedDecoration,
  this.borderRadius,
  this.animationDuration,
  this.animationCurve,
});
ParameterTypeRequiredDefault
keyKey?Nonull
tabsList<MorphTab>Yes—
sizeComponentSize?Nonull
initialIndexintNo0
selectedIndexint?Nonull
onChangedValueChanged<int>?Nonull
enabledboolNotrue
swipeableboolNotrue
swipeThresholddoubleNo.2
lazyboolNotrue
barPositionMorphTabsBarPositionNoMorphTabsBarPosition.top
contentHeightdouble?Nonull
contentSpacingdouble?Nonull
heightdouble?Nonull
iconSizedouble?Nonull
fontSizedouble?Nonull
spacingdoubleNo0
iconLabelSpacingdouble?Nonull
barPaddingEdgeInsetsGeometry?Nonull
barDecorationDecoration?Nonull
backgroundColorColor?Nonull
selectedBackgroundColorColor?Nonull
foregroundColorColor?Nonull
selectedForegroundColorColor?Nonull
selectedDecorationDecoration?Nonull
borderRadiusdouble?Nonull
animationDurationDuration?Nonull
animationCurveCurve?Nonull

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/morph_tabs/morph_tabs.dart

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

DartFlutter

Get started with FluttyUI