react-native-magic-tab-bar 1.0.1 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,37 @@
1
1
  "use strict";
2
2
 
3
- import { forwardRef, useEffect } from 'react';
4
- import { Pressable, StyleSheet } from 'react-native';
5
- import Animated, { FadeIn, LinearTransition, useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';
3
+ import { forwardRef, memo, useCallback, useEffect, useMemo } from 'react';
4
+ import { Pressable, StyleSheet, Text, View } from 'react-native';
5
+ import Animated, { FadeIn, FadeOut, LinearTransition, useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';
6
+
7
+ /** Minimal shape we use from the optional `expo-haptics` module. */
6
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ /**
10
+ * `expo-haptics` is an optional peer dependency. We load it through a guarded
11
+ * `require` so the library still installs and runs without it — when it's
12
+ * absent, the `haptics` prop simply has no effect.
13
+ */
14
+ const expoHaptics = (() => {
15
+ try {
16
+ return require('expo-haptics');
17
+ } catch {
18
+ return null;
19
+ }
20
+ })();
7
21
  const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
8
- const SPRING = {
9
- mass: 0.6,
10
- damping: 18,
11
- stiffness: 180
12
- };
13
- const transition = LinearTransition.springify().mass(SPRING.mass).damping(SPRING.damping).stiffness(SPRING.stiffness);
22
+
23
+ /** Fixed small icon size used by the compact "light" tab bar. */
24
+ const LIGHT_ICON_SIZE = 20;
25
+
26
+ /** Whether a `badge` value should render anything at all. */
27
+ function hasBadge(badge) {
28
+ return badge === true || typeof badge === 'number' && badge > 0 || typeof badge === 'string' && badge.length > 0;
29
+ }
30
+
31
+ /** Formats a numeric/string badge; numbers above 99 collapse to `99+`. */
32
+ function formatBadge(badge) {
33
+ return typeof badge === 'number' && badge > 99 ? '99+' : String(badge);
34
+ }
14
35
  /**
15
36
  * A single tab. Designed to be used as the `asChild` target of an
16
37
  * Expo Router `<TabTrigger>`, which injects the focus state and press handlers.
@@ -18,49 +39,193 @@ const transition = LinearTransition.springify().mass(SPRING.mass).damping(SPRING
18
39
  * Each tab sizes to its content — just the icon when inactive, icon + label
19
40
  * when active — so the active label is never clipped, on any screen width.
20
41
  */
21
- export const MagicTabItem = /*#__PURE__*/forwardRef(function MagicTabItem({
42
+ export const MagicTabItem = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function MagicTabItem({
22
43
  icon,
23
44
  label,
45
+ labelMode = 'active',
46
+ labelPosition = 'right',
47
+ badge,
48
+ disabled = false,
49
+ variant,
50
+ isLight = false,
51
+ haptics = false,
52
+ name,
53
+ onTabPress,
54
+ onTabLongPress,
24
55
  theme,
25
56
  isFocused,
26
57
  onPress,
27
58
  onLongPress
28
59
  }, ref) {
29
60
  const focused = Boolean(isFocused);
61
+ const {
62
+ spring
63
+ } = theme;
30
64
  const progress = useSharedValue(focused ? 1 : 0);
31
65
  useEffect(() => {
32
- progress.value = withSpring(focused ? 1 : 0, SPRING);
33
- }, [focused, progress]);
66
+ progress.value = withSpring(focused ? 1 : 0, spring);
67
+ }, [focused, progress, spring]);
68
+
69
+ // Rebuilt only when the theme's spring changes, so consumers can tune the
70
+ // layout animation's feel via `theme.spring`.
71
+ const transition = useMemo(() => LinearTransition.springify().mass(spring.mass).damping(spring.damping).stiffness(spring.stiffness), [spring.mass, spring.damping, spring.stiffness]);
34
72
  const pillStyle = useAnimatedStyle(() => ({
35
73
  opacity: progress.value,
36
74
  transform: [{
37
75
  scale: 0.8 + progress.value * 0.2
38
76
  }]
39
77
  }));
78
+ const handlePress = useCallback(event => {
79
+ if (haptics) expoHaptics?.selectionAsync?.();
80
+ onTabPress?.(name ?? '', focused);
81
+ onPress?.(event);
82
+ }, [haptics, onTabPress, name, focused, onPress]);
83
+ const handleLongPress = useCallback(event => {
84
+ onTabLongPress?.(name ?? '', focused);
85
+ onLongPress?.(event);
86
+ }, [onTabLongPress, name, focused, onLongPress]);
87
+ const badgeVisible = hasBadge(badge);
88
+ const badgeIsDot = badge === true;
89
+ const iconWithBadge = (iconColor, size) => /*#__PURE__*/_jsxs(View, {
90
+ children: [icon({
91
+ focused,
92
+ color: iconColor,
93
+ size
94
+ }), badgeVisible ? /*#__PURE__*/_jsx(View, {
95
+ pointerEvents: "none",
96
+ style: [styles.badge, badgeIsDot && styles.badgeDot, {
97
+ backgroundColor: theme.badgeColor
98
+ }],
99
+ children: badgeIsDot ? null : /*#__PURE__*/_jsx(Text, {
100
+ numberOfLines: 1,
101
+ style: [styles.badgeText, {
102
+ color: theme.badgeTextColor
103
+ }],
104
+ children: formatBadge(badge)
105
+ })
106
+ }) : null]
107
+ });
108
+
109
+ // ---- Raised circular action ("FAB") tab ----
110
+ if (variant === 'action') {
111
+ const size = theme.height - 6;
112
+ return /*#__PURE__*/_jsx(AnimatedPressable, {
113
+ ref: ref,
114
+ onPress: handlePress,
115
+ onLongPress: handleLongPress,
116
+ disabled: disabled,
117
+ accessibilityRole: "button",
118
+ accessibilityState: {
119
+ selected: focused,
120
+ disabled
121
+ },
122
+ style: [styles.action, {
123
+ width: size,
124
+ height: size,
125
+ borderRadius: size / 2,
126
+ backgroundColor: theme.actionColor
127
+ }, disabled && styles.disabled],
128
+ children: iconWithBadge(theme.actionIconColor, theme.iconSize + 2)
129
+ });
130
+ }
131
+
132
+ // ---- Normal tab ----
40
133
  const color = focused ? theme.activeColor : theme.inactiveColor;
41
- const showLabel = focused && !!label;
134
+
135
+ // ---- Compact "light" tab: small icon only, no label ----
136
+ if (isLight) {
137
+ return /*#__PURE__*/_jsxs(AnimatedPressable, {
138
+ ref: ref,
139
+ onPress: handlePress,
140
+ onLongPress: handleLongPress,
141
+ disabled: disabled,
142
+ accessibilityRole: "tab",
143
+ accessibilityState: {
144
+ selected: focused,
145
+ disabled
146
+ },
147
+ layout: transition,
148
+ style: [styles.itemLight, disabled && styles.disabled],
149
+ children: [/*#__PURE__*/_jsx(Animated.View, {
150
+ pointerEvents: "none",
151
+ style: [StyleSheet.absoluteFill, {
152
+ backgroundColor: theme.activePillColor,
153
+ borderRadius: theme.radius
154
+ }, pillStyle]
155
+ }), iconWithBadge(color, LIGHT_ICON_SIZE)]
156
+ });
157
+ }
158
+ const showLabel = !!label && labelMode !== 'never' && (labelMode === 'always' || focused);
159
+
160
+ // ---- Bottom labels: Material Design 3 layout ----
161
+ // The active indicator ("pill") wraps only the icon as a capsule; the label
162
+ // sits below it. Following M3's `LABEL_VISIBILITY_SELECTED` behaviour, each
163
+ // item is centered as a group: unlabeled tabs are just a centered icon, and
164
+ // the active tab grows to icon + label (nudging its icon up a touch). The
165
+ // layout transition animates that shift smoothly. Indicator sizing follows
166
+ // M3's 64x32-over-24dp ratio, scaled to the theme's icon size.
167
+ if (labelPosition === 'bottom') {
168
+ const indicatorHeight = theme.iconSize + 10;
169
+ const indicatorWidth = theme.iconSize + 32;
170
+ return /*#__PURE__*/_jsxs(AnimatedPressable, {
171
+ ref: ref,
172
+ onPress: handlePress,
173
+ onLongPress: handleLongPress,
174
+ disabled: disabled,
175
+ accessibilityRole: "tab",
176
+ accessibilityState: {
177
+ selected: focused,
178
+ disabled
179
+ },
180
+ layout: transition,
181
+ style: [styles.itemBottom, disabled && styles.disabled],
182
+ children: [/*#__PURE__*/_jsxs(View, {
183
+ style: [styles.indicatorWrap, {
184
+ width: indicatorWidth,
185
+ height: indicatorHeight
186
+ }],
187
+ children: [/*#__PURE__*/_jsx(Animated.View, {
188
+ pointerEvents: "none",
189
+ style: [StyleSheet.absoluteFill, {
190
+ backgroundColor: theme.activePillColor,
191
+ borderRadius: indicatorHeight / 2
192
+ }, pillStyle]
193
+ }), iconWithBadge(color, theme.iconSize)]
194
+ }), showLabel ? /*#__PURE__*/_jsx(Animated.Text, {
195
+ entering: FadeIn.duration(150),
196
+ exiting: FadeOut.duration(120),
197
+ numberOfLines: 1,
198
+ style: [styles.labelBottom, {
199
+ color,
200
+ fontSize: theme.fontSize - 1
201
+ }],
202
+ children: label
203
+ }) : null]
204
+ });
205
+ }
206
+
207
+ // ---- Right labels: floating pill wrapping icon + label ----
42
208
  return /*#__PURE__*/_jsxs(AnimatedPressable, {
43
209
  ref: ref,
44
- onPress: onPress,
45
- onLongPress: onLongPress,
210
+ onPress: handlePress,
211
+ onLongPress: handleLongPress,
212
+ disabled: disabled,
46
213
  accessibilityRole: "tab",
47
214
  accessibilityState: {
48
- selected: focused
215
+ selected: focused,
216
+ disabled
49
217
  },
50
218
  layout: transition,
51
- style: [styles.pressable, focused && styles.pressableActive],
219
+ style: [styles.pressable, focused && styles.pressableActive, disabled && styles.disabled],
52
220
  children: [/*#__PURE__*/_jsx(Animated.View, {
53
221
  pointerEvents: "none",
54
222
  style: [StyleSheet.absoluteFill, {
55
223
  backgroundColor: theme.activePillColor,
56
224
  borderRadius: theme.radius
57
225
  }, pillStyle]
58
- }), icon({
59
- focused,
60
- color,
61
- size: theme.iconSize
62
- }), showLabel ? /*#__PURE__*/_jsx(Animated.Text, {
226
+ }), iconWithBadge(color, theme.iconSize), showLabel ? /*#__PURE__*/_jsx(Animated.Text, {
63
227
  entering: FadeIn.duration(150),
228
+ exiting: FadeOut.duration(120),
64
229
  numberOfLines: 1,
65
230
  style: [styles.label, {
66
231
  color,
@@ -69,7 +234,7 @@ export const MagicTabItem = /*#__PURE__*/forwardRef(function MagicTabItem({
69
234
  children: label
70
235
  }) : null]
71
236
  });
72
- });
237
+ }));
73
238
  const styles = StyleSheet.create({
74
239
  pressable: {
75
240
  alignSelf: 'center',
@@ -91,6 +256,74 @@ const styles = StyleSheet.create({
91
256
  label: {
92
257
  fontWeight: '600',
93
258
  flexShrink: 1
259
+ },
260
+ // Material Design 3 bottom layout: icon (with capsule indicator) stacked
261
+ // over an always-below label.
262
+ itemBottom: {
263
+ alignSelf: 'center',
264
+ flexDirection: 'column',
265
+ alignItems: 'center',
266
+ justifyContent: 'center',
267
+ gap: 2,
268
+ paddingVertical: 3,
269
+ paddingHorizontal: 4
270
+ },
271
+ indicatorWrap: {
272
+ alignItems: 'center',
273
+ justifyContent: 'center'
274
+ },
275
+ // Compact "light" mode: small icon-only tap target with its own tight padding.
276
+ itemLight: {
277
+ alignSelf: 'center',
278
+ alignItems: 'center',
279
+ justifyContent: 'center',
280
+ paddingVertical: 6,
281
+ paddingHorizontal: 14
282
+ },
283
+ labelBottom: {
284
+ fontWeight: '600',
285
+ textAlign: 'center'
286
+ },
287
+ action: {
288
+ alignSelf: 'center',
289
+ alignItems: 'center',
290
+ justifyContent: 'center',
291
+ marginTop: -22,
292
+ shadowColor: '#000',
293
+ shadowOpacity: 0.3,
294
+ shadowRadius: 8,
295
+ shadowOffset: {
296
+ width: 0,
297
+ height: 4
298
+ },
299
+ elevation: 8
300
+ },
301
+ disabled: {
302
+ opacity: 0.4
303
+ },
304
+ badge: {
305
+ position: 'absolute',
306
+ top: -5,
307
+ left: '65%',
308
+ minWidth: 16,
309
+ height: 16,
310
+ paddingHorizontal: 4,
311
+ borderRadius: 8,
312
+ alignItems: 'center',
313
+ justifyContent: 'center'
314
+ },
315
+ badgeDot: {
316
+ top: -2,
317
+ minWidth: 8,
318
+ width: 8,
319
+ height: 8,
320
+ paddingHorizontal: 0,
321
+ borderRadius: 4
322
+ },
323
+ badgeText: {
324
+ fontSize: 10,
325
+ fontWeight: '700',
326
+ textAlign: 'center'
94
327
  }
95
328
  });
96
329
  //# sourceMappingURL=MagicTabItem.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","useEffect","Pressable","StyleSheet","Animated","FadeIn","LinearTransition","useAnimatedStyle","useSharedValue","withSpring","jsx","_jsx","jsxs","_jsxs","AnimatedPressable","createAnimatedComponent","SPRING","mass","damping","stiffness","transition","springify","MagicTabItem","icon","label","theme","isFocused","onPress","onLongPress","ref","focused","Boolean","progress","value","pillStyle","opacity","transform","scale","color","activeColor","inactiveColor","showLabel","accessibilityRole","accessibilityState","selected","layout","style","styles","pressable","pressableActive","children","View","pointerEvents","absoluteFill","backgroundColor","activePillColor","borderRadius","radius","size","iconSize","Text","entering","duration","numberOfLines","fontSize","create","alignSelf","flexDirection","alignItems","justifyContent","gap","paddingVertical","paddingHorizontal","flexShrink","fontWeight"],"sourceRoot":"../../src","sources":["MagicTabItem.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,SAAS,QAAwB,OAAO;AAC7D,SACEC,SAAS,EACTC,UAAU,QAGL,cAAc;AACrB,OAAOC,QAAQ,IACbC,MAAM,EACNC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGjC,MAAMC,iBAAiB,GAAGV,QAAQ,CAACW,uBAAuB,CAACb,SAAS,CAAC;AAErE,MAAMc,MAAM,GAAG;EAAEC,IAAI,EAAE,GAAG;EAAEC,OAAO,EAAE,EAAE;EAAEC,SAAS,EAAE;AAAI,CAAU;AAClE,MAAMC,UAAU,GAAGd,gBAAgB,CAACe,SAAS,CAAC,CAAC,CAC5CJ,IAAI,CAACD,MAAM,CAACC,IAAI,CAAC,CACjBC,OAAO,CAACF,MAAM,CAACE,OAAO,CAAC,CACvBC,SAAS,CAACH,MAAM,CAACG,SAAS,CAAC;AAqB9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,YAAY,gBAAGtB,UAAU,CACpC,SAASsB,YAAYA,CAAC;EAAEC,IAAI;EAAEC,KAAK;EAAEC,KAAK;EAAEC,SAAS;EAAEC,OAAO;EAAEC;AAAY,CAAC,EAAEC,GAAG,EAAE;EAClF,MAAMC,OAAO,GAAGC,OAAO,CAACL,SAAS,CAAC;EAClC,MAAMM,QAAQ,GAAGxB,cAAc,CAACsB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;EAEhD7B,SAAS,CAAC,MAAM;IACd+B,QAAQ,CAACC,KAAK,GAAGxB,UAAU,CAACqB,OAAO,GAAG,CAAC,GAAG,CAAC,EAAEd,MAA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jB,KAAK,EAAE,CAACC,MAAM,CAACvB,KAAK,EAAE;QAAEc,KAAK;QAAE0B,QAAQ,EAAEvC,KAAK,CAACuC;MAAS,CAAC,CAAE;MAAAd,QAAA,EAE1D1B;IAAK,CACO,CAAC,GACd,IAAI;EAAA,CACS,CAAC;AAExB,CACF,CAAC;AAED,MAAMuB,MAAM,GAAG5C,UAAU,CAAC8D,MAAM,CAAC;EAC/BjB,SAAS,EAAE;IACTkB,SAAS,EAAE,QAAQ;IACnBC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,GAAG,EAAE,CAAC;IACNC,eAAe,EAAE,CAAC;IAClBC,iBAAiB,EAAE;EACrB,CAAC;EACD;EACA;EACA;EACAvB,eAAe,EAAE;IACfwB,UAAU,EAAE,CAAC;IACbF,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE;EACrB,CAAC;EACDhD,KAAK,EAAE;IACLkD,UAAU,EAAE,KAAK;IACjBD,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","memo","useCallback","useEffect","useMemo","Pressable","StyleSheet","Text","View","Animated","FadeIn","FadeOut","LinearTransition","useAnimatedStyle","useSharedValue","withSpring","jsx","_jsx","jsxs","_jsxs","expoHaptics","require","AnimatedPressable","createAnimatedComponent","LIGHT_ICON_SIZE","hasBadge","badge","length","formatBadge","String","MagicTabItem","icon","label","labelMode","labelPosition","disabled","variant","isLight","haptics","name","onTabPress","onTabLongPress","theme","isFocused","onPress","onLongPress","ref","focused","Boolean","spring","progress","value","transition","springify","mass","damping","stiffness","pillStyle","opacity","transform","scale","handlePress","event","selectionAsync","handleLongPress","badgeVisible","badgeIsDot","iconWithBadge","iconColor","size","children","color","pointerEvents","style","styles","badgeDot","backgroundColor","badgeColor","numberOfLines","badgeText","badgeTextColor","height","accessibilityRole","accessibilityState","selected","action","width","borderRadius","actionColor","actionIconColor","iconSize","activeColor","inactiveColor","layout","itemLight","absoluteFill","activePillColor","radius","showLabel","indicatorHeight","indicatorWidth","itemBottom","indicatorWrap","entering","duration","exiting","labelBottom","fontSize","pressable","pressableActive","create","alignSelf","flexDirection","alignItems","justifyContent","gap","paddingVertical","paddingHorizontal","flexShrink","fontWeight","textAlign","marginTop","shadowColor","shadowOpacity","shadowRadius","shadowOffset","elevation","position","top","left","minWidth"],"sourceRoot":"../../src","sources":["MagicTabItem.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,EAAEC,WAAW,EAAEC,SAAS,EAAEC,OAAO,QAAwB,OAAO;AACzF,SACEC,SAAS,EACTC,UAAU,EACVC,IAAI,EACJC,IAAI,QAGC,cAAc;AACrB,OAAOC,QAAQ,IACbC,MAAM,EACNC,OAAO,EACPC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;;AAWhC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAG,CAAC,MAAM;EACzB,IAAI;IACF,OAAOC,OAAO,CAAC,cAAc,CAAC;EAChC,CAAC,CAAC,MAAM;IACN,OAAO,IAAI;EACb;AACF,CAAC,EAAE,CAAC;AAEJ,MAAMC,iBAAiB,GAAGb,QAAQ,CAACc,uBAAuB,CAAClB,SAAS,CAAC;;AAErE;AACA,MAAMmB,eAAe,GAAG,EAAE;;AAE1B;AACA,SAASC,QAAQA,CAACC,KAAiC,EAAW;EAC5D,OAAOA,KAAK,KAAK,IAAI,IAAK,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,GAAG,CAAE,IAAK,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACC,MAAM,GAAG,CAAE;AACtH;;AAEA;AACA,SAASC,WAAWA,CAACF,KAAsB,EAAU;EACnD,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,GAAG,E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E,CAAC;IACRL,MAAM,EAAE,CAAC;IACToC,iBAAiB,EAAE,CAAC;IACpB9B,YAAY,EAAE;EAChB,CAAC;EACDR,SAAS,EAAE;IACT4B,QAAQ,EAAE,EAAE;IACZY,UAAU,EAAE,KAAK;IACjBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,11 +1,68 @@
1
1
  "use strict";
2
2
 
3
+ import { useMemo } from 'react';
3
4
  import { Tabs, TabList, TabSlot, TabTrigger } from 'expo-router/ui';
5
+ import { usePathname } from 'expo-router';
4
6
  import { MagicTabBar } from "./MagicTabBar.js";
5
7
  import { MagicTabItem } from "./MagicTabItem.js";
6
- import { defaultTabs } from "./defaultTabs.js";
7
8
  import { defaultTheme } from "./theme.js";
8
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ /** Best-effort string path for an `Href` (covers string and `{ pathname }` forms). */
11
+ function hrefToPath(href) {
12
+ if (typeof href === 'string') return href;
13
+ const pathname = href?.pathname;
14
+ return typeof pathname === 'string' ? pathname : '';
15
+ }
16
+
17
+ /**
18
+ * Removes Expo Router group segments (`(group)`) from a path so hrefs match
19
+ * `usePathname()`. Groups are organizational and never appear in the URL, so
20
+ * `href: "/(home)/expenses"` must compare against a pathname of `/expenses`.
21
+ * Collapses any doubled or trailing slashes and falls back to `/` for root.
22
+ */
23
+ function stripGroupSegments(path) {
24
+ return path.replace(/\/\([^/)]+\)/g, '').replace(/\/{2,}/g, '/').replace(/(.)\/$/, '$1') || '/';
25
+ }
26
+
27
+ /**
28
+ * Finds the tab whose `href` best matches the current path, by longest prefix
29
+ * so nested routes (e.g. `/explore/details`) still resolve to their tab.
30
+ */
31
+ function findActiveTab(tabs, pathname) {
32
+ let best;
33
+ let bestLen = -1;
34
+ const currentPath = stripGroupSegments(pathname);
35
+ for (const tab of tabs) {
36
+ const rawPath = hrefToPath(tab.href);
37
+ if (!rawPath) continue;
38
+ const path = stripGroupSegments(rawPath);
39
+ const matches = path === '/' ? currentPath === '/' : currentPath === path || currentPath.startsWith(`${path}/`);
40
+ if (matches && path.length > bestLen) {
41
+ best = tab;
42
+ bestLen = path.length;
43
+ }
44
+ }
45
+ return best;
46
+ }
47
+
48
+ /**
49
+ * Normalizes the `showLabels` prop (boolean shorthand or explicit mode) and
50
+ * clamps it to what the current `labelPosition` can display well.
51
+ *
52
+ * `'always'` only works with `labelPosition="bottom"`: side-by-side, every tab
53
+ * would expand to its full label width and overflow the bar, so we downgrade
54
+ * it to `'active'` (and warn in dev).
55
+ */
56
+ function resolveLabelMode(showLabels, labelPosition) {
57
+ const mode = showLabels === true ? 'active' : showLabels === false ? 'never' : showLabels;
58
+ if (mode === 'always' && labelPosition !== 'bottom') {
59
+ if (__DEV__) {
60
+ console.warn('[MagicTabs] showLabels="always" requires labelPosition="bottom"; ' + 'falling back to "active". Set labelPosition="bottom" to keep every label visible.');
61
+ }
62
+ return 'active';
63
+ }
64
+ return mode;
65
+ }
9
66
  /**
10
67
  * A drop-in custom tab bar for Expo Router.
11
68
  *
@@ -21,38 +78,73 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
78
  * ```
22
79
  */
23
80
  export function MagicTabs({
24
- tabs = defaultTabs,
81
+ tabs,
25
82
  theme: themeOverride,
83
+ showLabels = true,
84
+ labelPosition = 'right',
85
+ isLight = false,
86
+ lightBottomMargin,
26
87
  variant,
27
88
  isTransparent,
28
89
  transparency,
29
90
  glass,
30
- renderBackground
91
+ renderBackground,
92
+ haptics,
93
+ onTabPress,
94
+ onTabLongPress
31
95
  }) {
32
- const theme = {
96
+ // Stable identity so it doesn't re-trigger memoized children every render.
97
+ const theme = useMemo(() => ({
33
98
  ...defaultTheme,
34
99
  ...themeOverride
35
- };
100
+ }), [themeOverride]);
101
+ const barLabelMode = resolveLabelMode(showLabels, labelPosition);
102
+
103
+ // The bar is "light" when either the whole bar is forced light (`isLight`)
104
+ // or the currently active tab opts in via its own `isLight` config. Changing
105
+ // routes flips this and the bar animates between the two layouts.
106
+ const pathname = usePathname();
107
+ const activeTab = findActiveTab(tabs, pathname);
108
+ const effectiveLight = isLight || !!activeTab?.isLight;
36
109
  return /*#__PURE__*/_jsxs(Tabs, {
37
110
  children: [/*#__PURE__*/_jsx(TabSlot, {}), /*#__PURE__*/_jsx(TabList, {
38
111
  asChild: true,
39
112
  children: /*#__PURE__*/_jsx(MagicTabBar, {
40
113
  theme: theme,
41
114
  variant: variant,
115
+ labelPosition: labelPosition,
116
+ isLight: effectiveLight,
117
+ lightBottomMargin: lightBottomMargin,
42
118
  isTransparent: isTransparent,
43
119
  transparency: transparency,
44
120
  glass: glass,
45
121
  renderBackground: renderBackground,
46
- children: tabs.map(tab => /*#__PURE__*/_jsx(TabTrigger, {
47
- name: tab.name,
48
- href: tab.href,
49
- asChild: true,
50
- children: /*#__PURE__*/_jsx(MagicTabItem, {
51
- icon: tab.icon,
52
- label: tab.label,
53
- theme: theme
54
- })
55
- }, tab.name))
122
+ children: tabs.map(tab => {
123
+ // A tab's `showLabel` overrides the bar-level mode: `false` forces
124
+ // icon-only, `true` shows it (falling back to `'active'` when the
125
+ // bar itself is set to `'never'`).
126
+ const labelMode = tab.showLabel === undefined ? barLabelMode : tab.showLabel ? barLabelMode === 'never' ? 'active' : barLabelMode : 'never';
127
+ return /*#__PURE__*/_jsx(TabTrigger, {
128
+ name: tab.name,
129
+ href: tab.href,
130
+ asChild: true,
131
+ children: /*#__PURE__*/_jsx(MagicTabItem, {
132
+ name: tab.name,
133
+ icon: tab.icon,
134
+ label: tab.label,
135
+ labelMode: labelMode,
136
+ labelPosition: labelPosition,
137
+ badge: tab.badge,
138
+ disabled: tab.disabled,
139
+ variant: tab.variant,
140
+ isLight: effectiveLight,
141
+ haptics: haptics,
142
+ onTabPress: onTabPress,
143
+ onTabLongPress: onTabLongPress,
144
+ theme: theme
145
+ })
146
+ }, tab.name);
147
+ })
56
148
  })
57
149
  })]
58
150
  });
@@ -1 +1 @@
1
- {"version":3,"names":["Tabs","TabList","TabSlot","TabTrigger","MagicTabBar","MagicTabItem","defaultTabs","defaultTheme","jsx","_jsx","jsxs","_jsxs","MagicTabs","tabs","theme","themeOverride","variant","isTransparent","transparency","glass","renderBackground","children","asChild","map","tab","name","href","icon","label"],"sourceRoot":"../../src","sources":["MagicTabs.tsx"],"mappings":";;AACA,SAASA,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAEC,UAAU,QAAQ,gBAAgB;AACnE,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,YAAY,QAAQ,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAmCvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAAC;EACxBC,IAAI,GAAGP,WAAW;EAClBQ,KAAK,EAAEC,aAAa;EACpBC,OAAO;EACPC,aAAa;EACbC,YAAY;EACZC,KAAK;EACLC;AACc,CAAC,EAAE;EACjB,MAAMN,KAAuB,GAAG;IAAE,GAAGP,YAAY;IAAE,GAAGQ;EAAc,CAAC;EAErE,oBACEJ,KAAA,CAACX,IAAI;IAAAqB,QAAA,gBACHZ,IAAA,CAACP,OAAO,IAAE,CAAC,eACXO,IAAA,CAACR,OAAO;MAACqB,OAAO;MAAAD,QAAA,eACdZ,IAAA,CAACL,WAAW;QACVU,KAAK,EAAEA,KAAM;QACbE,OAAO,EAAEA,OAAQ;QACjBC,aAAa,EAAEA,aAAc;QAC7BC,YAAY,EAAEA,YAAa;QAC3BC,KAAK,EAAEA,KAAM;QACbC,gBAAgB,EAAEA,gBAAiB;QAAAC,QAAA,EAElCR,IAAI,CAACU,GAAG,CAAEC,GAAG,iBACZf,IAAA,CAACN,UAAU;UAAgBsB,IAAI,EAAED,GAAG,CAACC,IAAK;UAACC,IAAI,EAAEF,GAAG,CAACE,IAAK;UAACJ,OAAO;UAAAD,QAAA,eAChEZ,IAAA,CAACJ,YAAY;YAACsB,IAAI,EAAEH,GAAG,CAACG,IAAK;YAACC,KAAK,EAAEJ,GAAG,CAACI,KAAM;YAACd,KAAK,EAAEA;UAAM,CAAE;QAAC,GADjDU,GAAG,CAACC,IAET,CACb;MAAC,CACS;IAAC,CACP,CAAC;EAAA,CACN,CAAC;AAEX","ignoreList":[]}
1
+ {"version":3,"names":["useMemo","Tabs","TabList","TabSlot","TabTrigger","usePathname","MagicTabBar","MagicTabItem","defaultTheme","jsx","_jsx","jsxs","_jsxs","hrefToPath","href","pathname","stripGroupSegments","path","replace","findActiveTab","tabs","best","bestLen","currentPath","tab","rawPath","matches","startsWith","length","resolveLabelMode","showLabels","labelPosition","mode","__DEV__","console","warn","MagicTabs","theme","themeOverride","isLight","lightBottomMargin","variant","isTransparent","transparency","glass","renderBackground","haptics","onTabPress","onTabLongPress","barLabelMode","activeTab","effectiveLight","children","asChild","map","labelMode","showLabel","undefined","name","icon","label","badge","disabled"],"sourceRoot":"../../src","sources":["MagicTabs.tsx"],"mappings":";;AAAA,SAASA,OAAO,QAAwB,OAAO;AAC/C,SAASC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAEC,UAAU,QAAQ,gBAAgB;AACnE,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,YAAY,QAAQ,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAavC;AACA,SAASC,UAAUA,CAACC,IAAU,EAAU;EACtC,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE,OAAOA,IAAI;EACzC,MAAMC,QAAQ,GAAID,IAAI,EAA4BC,QAAQ;EAC1D,OAAO,OAAOA,QAAQ,KAAK,QAAQ,GAAGA,QAAQ,GAAG,EAAE;AACrD;;AAEA;AACA;AACA;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EAAEA,gBAAiB;QAAAO,QAAA,EAElChC,IAAI,CAACkC,GAAG,CAAE9B,GAAG,IAAK;UACjB;UACA;UACA;UACA,MAAM+B,SAAyB,GAC7B/B,GAAG,CAACgC,SAAS,KAAKC,SAAS,GACvBR,YAAY,GACZzB,GAAG,CAACgC,SAAS,GACXP,YAAY,KAAK,OAAO,GACtB,QAAQ,GACRA,YAAY,GACd,OAAO;UACf,oBACEvC,IAAA,CAACN,UAAU;YAAgBsD,IAAI,EAAElC,GAAG,CAACkC,IAAK;YAAC5C,IAAI,EAAEU,GAAG,CAACV,IAAK;YAACuC,OAAO;YAAAD,QAAA,eAChE1C,IAAA,CAACH,YAAY;cACXmD,IAAI,EAAElC,GAAG,CAACkC,IAAK;cACfC,IAAI,EAAEnC,GAAG,CAACmC,IAAK;cACfC,KAAK,EAAEpC,GAAG,CAACoC,KAAM;cACjBL,SAAS,EAAEA,SAAU;cACrBxB,aAAa,EAAEA,aAAc;cAC7B8B,KAAK,EAAErC,GAAG,CAACqC,KAAM;cACjBC,QAAQ,EAAEtC,GAAG,CAACsC,QAAS;cACvBrB,OAAO,EAAEjB,GAAG,CAACiB,OAAQ;cACrBF,OAAO,EAAEY,cAAe;cACxBL,OAAO,EAAEA,OAAQ;cACjBC,UAAU,EAAEA,UAAW;cACvBC,cAAc,EAAEA,cAAe;cAC/BX,KAAK,EAAEA;YAAM,CACd;UAAC,GAfab,GAAG,CAACkC,IAgBT,CAAC;QAEjB,CAAC;MAAC,CACS;IAAC,CACP,CAAC;EAAA,CACN,CAAC;AAEX","ignoreList":[]}
@@ -17,11 +17,12 @@ const ionicon = (active, inactive) => ({
17
17
  });
18
18
 
19
19
  /**
20
- * The tabs used when `<MagicTabs />` is rendered without a `tabs` prop:
21
- * Home, Explore, Notifications, Inbox and Profile, each with a matching Ionicon.
20
+ * A ready-made demo tab set Home, Explore, Notifications, Inbox and Profile,
21
+ * each with a matching Ionicon. Opt in via the subpath:
22
+ * `import { defaultTabs } from 'react-native-magic-tab-bar/default-tabs'`.
22
23
  *
23
- * Assumes the app has routes named `index` (`/`), `explore`, `notifications`,
24
- * `inbox` and `profile`. Pass your own `tabs` to `<MagicTabs />` to override.
24
+ * Requires `@expo/vector-icons` and assumes the app has routes named `index`
25
+ * (`/`), `explore`, `notifications`, `inbox` and `profile`.
25
26
  */
26
27
  export const defaultTabs = [{
27
28
  name: "index",
@@ -1 +1 @@
1
- {"version":3,"names":["Ionicons","jsx","_jsx","ionicon","active","inactive","focused","color","size","name","defaultTabs","href","label","icon"],"sourceRoot":"../../src","sources":["defaultTabs.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAM9C;AACA;AACA;AACA;AACA,MAAMC,OAAO,GACXA,CAACC,MAAmB,EAAEC,QAAqB,KAC3C,CAAC;EAAEC,OAAO;EAAEC,KAAK;EAAEC;AAAwB,CAAC,kBAC1CN,IAAA,CAACF,QAAQ;EAACS,IAAI,EAAEH,OAAO,GAAGF,MAAM,GAAGC,QAAS;EAACE,KAAK,EAAEA,KAAM;EAACC,IAAI,EAAEA;AAAK,CAAE,CACzE;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,WAA6B,GAAG,CAC3C;EACED,IAAI,EAAE,OAAO;EACbE,IAAI,EAAE,GAAG;EACTC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAEV,OAAO,CAAC,MAAM,EAAE,cAAc;AACtC,CAAC,EACD;EACEM,IAAI,EAAE,SAAS;EACfE,IAAI,EAAE,UAAU;EAChBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAEV,OAAO,CAAC,SAAS,EAAE,iBAAiB;AAC5C,CAAC,EACD;EACEM,IAAI,EAAE,eAAe;EACrBE,IAAI,EAAE,gBAAgB;EACtBC,KAAK,EAAE,eAAe;EACtBC,IAAI,EAAEV,OAAO,CAAC,eAAe,EAAE,uBAAuB;AACxD,CAAC,EACD;EACEM,IAAI,EAAE,OAAO;EACbE,IAAI,EAAE,QAAQ;EACdC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAEV,OAAO,CAAC,kBAAkB,EAAE,oBAAoB;AACxD,CAAC,EACD;EACEM,IAAI,EAAE,SAAS;EACfE,IAAI,EAAE,UAAU;EAChBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAEV,OAAO,CAAC,QAAQ,EAAE,gBAAgB;AAC1C,CAAC,CACF","ignoreList":[]}
1
+ {"version":3,"names":["Ionicons","jsx","_jsx","ionicon","active","inactive","focused","color","size","name","defaultTabs","href","label","icon"],"sourceRoot":"../../src","sources":["defaultTabs.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAM9C;AACA;AACA;AACA;AACA,MAAMC,OAAO,GACXA,CAACC,MAAmB,EAAEC,QAAqB,KAC3C,CAAC;EAAEC,OAAO;EAAEC,KAAK;EAAEC;AAAwB,CAAC,kBAC1CN,IAAA,CAACF,QAAQ;EAACS,IAAI,EAAEH,OAAO,GAAGF,MAAM,GAAGC,QAAS;EAACE,KAAK,EAAEA,KAAM;EAACC,IAAI,EAAEA;AAAK,CAAE,CACzE;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,WAA6B,GAAG,CAC3C;EACED,IAAI,EAAE,OAAO;EACbE,IAAI,EAAE,GAAG;EACTC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAEV,OAAO,CAAC,MAAM,EAAE,cAAc;AACtC,CAAC,EACD;EACEM,IAAI,EAAE,SAAS;EACfE,IAAI,EAAE,UAAU;EAChBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAEV,OAAO,CAAC,SAAS,EAAE,iBAAiB;AAC5C,CAAC,EACD;EACEM,IAAI,EAAE,eAAe;EACrBE,IAAI,EAAE,gBAAgB;EACtBC,KAAK,EAAE,eAAe;EACtBC,IAAI,EAAEV,OAAO,CAAC,eAAe,EAAE,uBAAuB;AACxD,CAAC,EACD;EACEM,IAAI,EAAE,OAAO;EACbE,IAAI,EAAE,QAAQ;EACdC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAEV,OAAO,CAAC,kBAAkB,EAAE,oBAAoB;AACxD,CAAC,EACD;EACEM,IAAI,EAAE,SAAS;EACfE,IAAI,EAAE,UAAU;EAChBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAEV,OAAO,CAAC,QAAQ,EAAE,gBAAgB;AAC1C,CAAC,CACF","ignoreList":[]}
@@ -3,6 +3,11 @@
3
3
  export { MagicTabs } from "./MagicTabs.js";
4
4
  export { MagicTabBar } from "./MagicTabBar.js";
5
5
  export { MagicTabItem } from "./MagicTabItem.js";
6
- export { defaultTabs } from "./defaultTabs.js";
7
6
  export { defaultTheme } from "./theme.js";
7
+
8
+ // `defaultTabs` is intentionally NOT re-exported here — it depends on an icon
9
+ // library, and keeping it out of the main entry means the core stays
10
+ // zero-runtime-dependency. Import it from the subpath for the demo set:
11
+ //
12
+ // import { defaultTabs } from 'react-native-magic-tab-bar/default-tabs';
8
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["MagicTabs","MagicTabBar","MagicTabItem","defaultTabs","defaultTheme"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,gBAAa;AACvC,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,YAAY,QAAQ,YAAS","ignoreList":[]}
1
+ {"version":3,"names":["MagicTabs","MagicTabBar","MagicTabItem","defaultTheme"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,gBAAa;AACvC,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,YAAY,QAAQ,YAAS;;AAEtC;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -10,7 +10,16 @@ export const defaultTheme = {
10
10
  fontSize: 12,
11
11
  height: 56,
12
12
  radius: 28,
13
+ badgeColor: '#FF3B30',
14
+ badgeTextColor: '#FFFFFF',
15
+ actionColor: '#0A84FF',
16
+ actionIconColor: '#FFFFFF',
13
17
  horizontalMargin: 14,
14
- bottomInset: 10
18
+ bottomInset: 10,
19
+ spring: {
20
+ mass: 0.6,
21
+ damping: 18,
22
+ stiffness: 180
23
+ }
15
24
  };
16
25
  //# sourceMappingURL=theme.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["defaultTheme","barColor","activePillColor","activeColor","inactiveColor","iconSize","fontSize","height","radius","horizontalMargin","bottomInset"],"sourceRoot":"../../src","sources":["theme.ts"],"mappings":";;AAEA;AACA,OAAO,MAAMA,YAA8B,GAAG;EAC5CC,QAAQ,EAAE,wBAAwB;EAClCC,eAAe,EAAE,2BAA2B;EAC5CC,WAAW,EAAE,SAAS;EACtBC,aAAa,EAAE,SAAS;EACxBC,QAAQ,EAAE,EAAE;EACZC,QAAQ,EAAE,EAAE;EACZC,MAAM,EAAE,EAAE;EACVC,MAAM,EAAE,EAAE;EACVC,gBAAgB,EAAE,EAAE;EACpBC,WAAW,EAAE;AACf,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["defaultTheme","barColor","activePillColor","activeColor","inactiveColor","iconSize","fontSize","height","radius","badgeColor","badgeTextColor","actionColor","actionIconColor","horizontalMargin","bottomInset","spring","mass","damping","stiffness"],"sourceRoot":"../../src","sources":["theme.ts"],"mappings":";;AAEA;AACA,OAAO,MAAMA,YAA8B,GAAG;EAC5CC,QAAQ,EAAE,wBAAwB;EAClCC,eAAe,EAAE,2BAA2B;EAC5CC,WAAW,EAAE,SAAS;EACtBC,aAAa,EAAE,SAAS;EACxBC,QAAQ,EAAE,EAAE;EACZC,QAAQ,EAAE,EAAE;EACZC,MAAM,EAAE,EAAE;EACVC,MAAM,EAAE,EAAE;EACVC,UAAU,EAAE,SAAS;EACrBC,cAAc,EAAE,SAAS;EACzBC,WAAW,EAAE,SAAS;EACtBC,eAAe,EAAE,SAAS;EAC1BC,gBAAgB,EAAE,EAAE;EACpBC,WAAW,EAAE,EAAE;EACfC,MAAM,EAAE;IAAEC,IAAI,EAAE,GAAG;IAAEC,OAAO,EAAE,EAAE;IAAEC,SAAS,EAAE;EAAI;AACnD,CAAC","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from "react";
2
2
  import { View, type ViewProps } from "react-native";
3
- import type { MagicTabBarTheme, MagicTabBarVariant } from "./types";
3
+ import type { MagicLabelPosition, MagicTabBarTheme, MagicTabBarVariant } from "./types";
4
4
  /** Lowest bar opacity we allow, so a transparent bar never becomes invisible. */
5
5
  export declare const MIN_BAR_OPACITY = 0.1;
6
6
  export interface MagicTabBarProps extends ViewProps {
@@ -8,6 +8,12 @@ export interface MagicTabBarProps extends ViewProps {
8
8
  theme: MagicTabBarTheme;
9
9
  /** Position the bar floating over content (default) or docked in-flow. */
10
10
  variant?: MagicTabBarVariant;
11
+ /**
12
+ * Where the tab labels sit. `'bottom'` gives the bar extra height so the
13
+ * stacked icon+label has room to breathe. Provided automatically by
14
+ * `MagicTabs`.
15
+ */
16
+ labelPosition?: MagicLabelPosition;
11
17
  /**
12
18
  * Make the bar background see-through. Off by default — the bar is fully
13
19
  * opaque. Set the strength of the effect with `transparency`.
@@ -27,6 +33,17 @@ export interface MagicTabBarProps extends ViewProps {
27
33
  glass?: boolean;
28
34
  /** Render a custom background (e.g. a blur/glass view) behind the bar. */
29
35
  renderBackground?: () => ReactNode;
36
+ /**
37
+ * Compact "light" mode: a shorter, icon-only bar with extra bottom margin.
38
+ * Provided automatically by `MagicTabs`.
39
+ */
40
+ isLight?: boolean;
41
+ /**
42
+ * Extra bottom margin below the bar in "light" mode only. Added on top of the
43
+ * safe-area inset and `theme.bottomInset`. Ignored when `isLight` is false.
44
+ * Defaults to {@link LIGHT_EXTRA_BOTTOM_MARGIN}.
45
+ */
46
+ lightBottomMargin?: number;
30
47
  /** The tab items. Provided automatically by `MagicTabs`. */
31
48
  children?: ReactNode;
32
49
  }