Customizing Styles
The SmartStack component accepts various props to customize its appearance and behavior:
Dimensions & Layout
Control the widget dimensions and spacing:
<SmartStack
// Base (collapsed) dimensions
baseWidth={364}
baseHeight={170}
baseRadius={22}
// Expanded dimensions
expandedWidth={370}
expandedHeight={176}
expandedRadius={26}
/>
Animation Configuration
Customize the expansion and scroll animations:
<SmartStack
// Expansion spring configuration
expansionConfig={{
damping: 20,
stiffness: 200,
mass: 1,
}}
// Scroll/snap behavior
scrollConfig={{
parallaxOffset: 0.8,
adjacentScale: 0.9,
snapStiffness: 200,
}}
// Auto-collapse delay (ms)
collapseDelay={350}
/>
Navigation Dots
Style the navigation indicators:
<SmartStack
navigationConfig={{
// Appearance
dotSize: 5,
dotSpacing: 3.5,
activeOpacity: 1,
inactiveOpacity: 0.6,
// Colors
dotColor="#FFFFFF"
activeDotColor="#FFFFFF"
// Animation
transitionDuration: 150,
staggerDelay: 0.07,
// Optional: disable dots entirely
showNavigation={true}
}}
/>
Visual Styling
Adjust the background blur and colors:
<SmartStack
// Blur effect
blurConfig={{
intensity: 80,
tint: "systemThinMaterial" // or "dark" | "light"
}}
// Background colors
backgroundColor="rgba(255, 255, 255, 0.25)"
// Label styling
labelConfig={{
fontSize: 12,
color: "#FFFFFF",
style: {} // Additional text styles
}}
/>
All customization props are optional and come with sensible defaults that match the iOS design. For a complete list of available props and their default values, see the API Reference.
Last updated on