Skip to main content

Documentation Index

Fetch the complete documentation index at: https://synapsync.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Nebux Design System provides a complete set of shimmer/skeleton loading components for creating professional loading states in Flutter applications. These components use gradient-based shimmer animations to indicate loading content.

Components

  • NbxShimmerAnimation - Base animation wrapper
  • NbxShimmerContainer - Basic shimmer container
  • NbxShimmerContainerExpanded - Expanded shimmer container
  • NbxShimmerContainerList - List of shimmer containers
  • NbxShimmerTwiceContainerList - Two-row shimmer container list
  • NbxShimmerListTile - Shimmer list tile with multiple elements
  • NbxShimmerListTileListView - Scrollable list of shimmer tiles
  • NbxShimmerGrid - Grid of shimmer items

ShimmerSkeletonStyle

All shimmer components use ShimmerSkeletonStyle for configuration.
width
double
required
Width of the shimmer container.
height
double?
Height of the shimmer container. If null, container will size to content.
borderRadiusDouble
double
default:"8.0"
Border radius for rectangular containers.
boxShape
BoxShape
default:"BoxShape.rectangle"
Shape of the container (BoxShape.rectangle or BoxShape.circle).
customColor
Color?
Custom color override for the shimmer container.

NbxShimmerAnimation

Base animation wrapper that provides shimmer effect to any child widget.

Properties

child
Widget
required
Child widget to be wrapped with shimmer animation.
gradient
LinearGradient?
Custom gradient for the shimmer effect. If null, uses default gradient.

Example

NbxShimmerAnimation(
  child: Container(
    width: 200,
    height: 100,
    color: Colors.grey[300],
  ),
)

NbxShimmerContainer

A basic shimmer container with customizable styling.

Properties

style
ShimmerSkeletonStyle
required
Style configuration for the shimmer container.

Examples

// Rectangle shimmer
NbxShimmerContainer(
  style: ShimmerSkeletonStyle(
    width: 200,
    height: 100,
    borderRadiusDouble: 12,
  ),
)

// Circular shimmer
NbxShimmerContainer(
  style: ShimmerSkeletonStyle(
    width: 50,
    height: 50,
    boxShape: BoxShape.circle,
  ),
)

NbxShimmerContainerList

Displays a list of shimmer containers in horizontal or vertical layout.

Properties

style
ShimmerSkeletonStyle
required
Style configuration for the shimmer containers.
itemCount
int
required
Number of containers to display in the list.
isColumn
bool
required
Whether to display containers in a column (vertical) layout. If false, displays horizontally.

Examples

// Vertical list
NbxShimmerContainerList(
  style: ShimmerSkeletonStyle(
    width: double.infinity,
    height: 60,
  ),
  itemCount: 5,
  isColumn: true,
)

// Horizontal list
NbxShimmerContainerList(
  style: ShimmerSkeletonStyle(
    width: 120,
    height: 80,
    borderRadiusDouble: 8,
  ),
  itemCount: 4,
  isColumn: false,
)

NbxShimmerListTile

A shimmer widget that simulates a list tile with customizable elements.

Properties

titleStyle
ShimmerSkeletonStyle
required
Style configuration for the title element.
leadingStyle
ShimmerSkeletonStyle?
Style configuration for the leading element (e.g., avatar).
subtitleStyle
ShimmerSkeletonStyle?
Style configuration for the subtitle element.
paragraphStyle
ShimmerSkeletonStyle?
Style configuration for the paragraph element.
trailingStyle
ShimmerSkeletonStyle?
Style configuration for the trailing element.
padding
EdgeInsetsGeometry?
Padding around the entire list tile.
contentSpacing
double?
Spacing between content elements horizontally.
verticalSpacing
double?
Vertical spacing between elements.
hasContainer
bool?
Whether to wrap the tile in a container with background.

Examples

// Simple list tile
NbxShimmerListTile(
  leadingStyle: ShimmerSkeletonStyle(
    width: 50,
    height: 50,
    boxShape: BoxShape.circle,
  ),
  titleStyle: ShimmerSkeletonStyle(
    width: 150,
    height: 20,
  ),
  subtitleStyle: ShimmerSkeletonStyle(
    width: 100,
    height: 16,
  ),
)

// List tile with container
NbxShimmerListTile(
  hasContainer: true,
  leadingStyle: ShimmerSkeletonStyle(
    width: 60,
    height: 60,
    borderRadiusDouble: 8,
  ),
  titleStyle: ShimmerSkeletonStyle(
    width: 200,
    height: 18,
  ),
  subtitleStyle: ShimmerSkeletonStyle(
    width: 150,
    height: 14,
  ),
  paragraphStyle: ShimmerSkeletonStyle(
    width: double.infinity,
    height: 12,
  ),
  trailingStyle: ShimmerSkeletonStyle(
    width: 24,
    height: 24,
    boxShape: BoxShape.circle,
  ),
  padding: EdgeInsets.all(16),
  contentSpacing: 12,
  verticalSpacing: 8,
)

NbxShimmerListTileListView

A scrollable list of shimmer list tiles with separators.

Properties

itemCount
int
required
Number of list tiles to display.
titleStyle
ShimmerSkeletonStyle
required
Style for title elements in each tile.
heightFull
double?
Total height of the list view.
leadingStyle
ShimmerSkeletonStyle?
Style for leading elements in each tile.
subtitleStyle
ShimmerSkeletonStyle?
Style for subtitle elements in each tile.
paragraphStyle
ShimmerSkeletonStyle?
Style for paragraph elements in each tile.
trailingStyle
ShimmerSkeletonStyle?
Style for trailing elements in each tile.
padding
EdgeInsetsGeometry?
Padding around each list tile.
contentSpacing
double?
Spacing between content elements in each tile.
verticalSpacing
double?
Vertical spacing between elements in each tile.
hasContainer
bool?
Whether to add container background to each tile.
dividerWidget
Widget?
Custom divider widget between tiles. If null, uses default divider.

Example

NbxShimmerListTileListView(
  itemCount: 10,
  heightFull: 600,
  leadingStyle: ShimmerSkeletonStyle(
    width: 50,
    height: 50,
    boxShape: BoxShape.circle,
  ),
  titleStyle: ShimmerSkeletonStyle(
    width: 180,
    height: 18,
  ),
  subtitleStyle: ShimmerSkeletonStyle(
    width: 120,
    height: 14,
  ),
  padding: EdgeInsets.symmetric(vertical: 12, horizontal: 16),
)

NbxShimmerGrid

Displays a grid of shimmer skeleton items, typically for icon-based content.

Properties

itemCount
int
required
Number of grid items to display.

Example

NbxShimmerGrid(
  itemCount: 9,
)
The grid uses a 3-column layout with fixed aspect ratio and displays icon placeholders.

Usage Patterns

Product List Loading

class ProductListShimmer extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return NbxShimmerListTileListView(
      itemCount: 5,
      leadingStyle: ShimmerSkeletonStyle(
        width: 80,
        height: 80,
        borderRadiusDouble: 8,
      ),
      titleStyle: ShimmerSkeletonStyle(
        width: 150,
        height: 20,
      ),
      subtitleStyle: ShimmerSkeletonStyle(
        width: 100,
        height: 16,
      ),
      paragraphStyle: ShimmerSkeletonStyle(
        width: double.infinity,
        height: 14,
      ),
      hasContainer: true,
      padding: EdgeInsets.all(12),
    );
  }
}

Profile Header Shimmer

class ProfileHeaderShimmer extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        // Avatar
        NbxShimmerContainer(
          style: ShimmerSkeletonStyle(
            width: 100,
            height: 100,
            boxShape: BoxShape.circle,
          ),
        ),
        SizedBox(height: 16),
        // Name
        NbxShimmerContainer(
          style: ShimmerSkeletonStyle(
            width: 200,
            height: 24,
            borderRadiusDouble: 4,
          ),
        ),
        SizedBox(height: 8),
        // Bio
        NbxShimmerContainer(
          style: ShimmerSkeletonStyle(
            width: 150,
            height: 16,
            borderRadiusDouble: 4,
          ),
        ),
      ],
    );
  }
}

Card Grid Shimmer

class CardGridShimmer extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GridView.builder(
      gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
        crossAxisCount: 2,
        crossAxisSpacing: 16,
        mainAxisSpacing: 16,
        childAspectRatio: 0.75,
      ),
      itemCount: 6,
      itemBuilder: (context, index) {
        return NbxShimmerAnimation(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Expanded(
                child: Container(
                  decoration: BoxDecoration(
                    color: Colors.grey[300],
                    borderRadius: BorderRadius.circular(8),
                  ),
                ),
              ),
              SizedBox(height: 8),
              Container(
                height: 16,
                width: double.infinity,
                decoration: BoxDecoration(
                  color: Colors.grey[300],
                  borderRadius: BorderRadius.circular(4),
                ),
              ),
              SizedBox(height: 4),
              Container(
                height: 14,
                width: 100,
                decoration: BoxDecoration(
                  color: Colors.grey[300],
                  borderRadius: BorderRadius.circular(4),
                ),
              ),
            ],
          ),
        );
      },
    );
  }
}

Conditional Loading

class ProductList extends StatelessWidget {
  final bool isLoading;
  final List<Product> products;

  const ProductList({
    required this.isLoading,
    required this.products,
  });

  @override
  Widget build(BuildContext context) {
    if (isLoading) {
      return NbxShimmerListTileListView(
        itemCount: 5,
        titleStyle: ShimmerSkeletonStyle(width: 150, height: 20),
        leadingStyle: ShimmerSkeletonStyle(
          width: 60,
          height: 60,
          borderRadiusDouble: 8,
        ),
      );
    }

    return ListView.builder(
      itemCount: products.length,
      itemBuilder: (context, index) {
        return ProductTile(product: products[index]);
      },
    );
  }
}

NbxShimmerContainerExpanded

A shimmer container that expands to fill available vertical space in its parent.

Properties

style
ShimmerSkeletonStyle
required
Style configuration for the shimmer container appearance

Usage Example

Row(
  children: [
    NbxShimmerContainer(
      style: ShimmerSkeletonStyle(width: 100, height: 200),
    ),
    SizedBox(width: 16),
    NbxShimmerContainerExpanded(
      style: ShimmerSkeletonStyle(borderRadiusDouble: 8),
    ),
  ],
)
This is useful when you need a shimmer container to fill remaining space in a row or column layout.

NbxShimmerTwiceContainerList

A shimmer widget that displays two separate lists of skeleton containers, useful for complex loading states with multiple content sections.

Properties

heightFull
double
required
Total height of the widget
axis
Axis
required
Layout axis direction (horizontal or vertical)
skeletonListOneStyle
ShimmerSkeletonStyle
required
Style configuration for the first list of containers
itemCountListOne
int
required
Number of containers in the first list
isColumnListOne
bool
required
Whether the first list uses vertical layout
skeletonListTwoStyle
ShimmerSkeletonStyle
required
Style configuration for the second list of containers
itemCountListTwo
int
required
Number of containers in the second list
isColumnListTwo
bool
required
Whether the second list uses vertical layout

Usage Example

NbxShimmerTwiceContainerList(
  heightFull: 300,
  axis: Axis.horizontal,
  skeletonListOneStyle: ShimmerSkeletonStyle(
    width: 100,
    height: 100,
    borderRadiusDouble: 8,
  ),
  itemCountListOne: 3,
  isColumnListOne: false,
  skeletonListTwoStyle: ShimmerSkeletonStyle(
    width: 80,
    height: 80,
    borderRadiusDouble: 8,
  ),
  itemCountListTwo: 4,
  isColumnListTwo: false,
)
This component is ideal for creating complex loading states with multiple distinct content areas, such as horizontal scrolling lists with different item types.

Customization

Custom Gradient

NbxShimmerAnimation(
  gradient: LinearGradient(
    colors: [
      Colors.grey[300]!,
      Colors.grey[100]!,
      Colors.grey[300]!,
    ],
    stops: [0.0, 0.5, 1.0],
  ),
  child: YourWidget(),
)

Custom Colors

NbxShimmerContainer(
  style: ShimmerSkeletonStyle(
    width: 200,
    height: 100,
    customColor: Colors.blue[100],
  ),
)

Best Practices

  1. Match Layout: Design shimmers to match the actual content layout
  2. Appropriate Count: Show a reasonable number of shimmer items (3-5 for lists)
  3. Consistent Sizing: Use dimensions similar to real content
  4. Loading State: Always show shimmer when fetching data
  5. Quick Transitions: Ensure smooth transitions between shimmer and real content

See Also