S Animated Tabs

A professional, highly customizable animated tab switcher widget for Flutter that follows Material 3 principles and provides smooth, polished animations.

Features

  • Smooth animated indicator with multiple animation styles
  • Material 3 friendly styling and color scheme presets
  • Optional haptic feedback and elevation
  • Customizable sizing, padding, border radius, and typography
  • Fully configurable colors or preset color schemes
  • Enhanced animations with scale and bounce effects

Example app preview

Installation

Add the dependency in your pubspec.yaml:

dependencies:
  s_animated_tabs: ^2.0.0

Then run:

flutter pub get

Usage

import 'package:s_animated_tabs/s_animated_tabs.dart';

SAnimatedTabs(
  tabTitles: const ['Overview', 'Details', 'Reviews'],
  onTabSelected: (index) {
    // Handle selection
  },
)

Advanced configuration

SAnimatedTabs(
  tabTitles: const ['Overview', 'Details', 'Reviews'],
  onTabSelected: (index) {},
  initialIndex: 1,
  height: 52,
  width: 320,
  padding: const EdgeInsets.all(4),
  borderRadius: 12,
  animationDuration: const Duration(milliseconds: 320),
  animationCurve: Curves.easeOutQuart,
  enableHapticFeedback: true,
  enableElevation: true,
  elevation: 2,
  textSize: TabTextSize.medium,
  colorScheme: TabColorScheme.primary,
  enableEnhancedAnimations: true,
  animationStyle: TabAnimationStyle.smooth,
)

API highlights

  • tabTitles and onTabSelected are required.
  • TabTextSize presets: small, medium, large.
  • TabColorScheme presets: primary, secondary, surface, outline, tertiary.
  • TabAnimationStyle presets: smooth, bouncy, snappy, elastic.

Example

Run the example app to explore a basic and advanced demo with live toggles:

cd example
flutter run

License

MIT — see the LICENSE file for details.

Libraries

s_animated_tabs
s_animated_tabs package