@startupjs-ui/tabs 0.1.11 → 0.1.19

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.mdx +16 -9
  3. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.1.19](https://github.com/startupjs/startupjs-ui/compare/v0.1.18...v0.1.19) (2026-03-17)
7
+
8
+ **Note:** Version bump only for package @startupjs-ui/tabs
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.1.16](https://github.com/startupjs/startupjs-ui/compare/v0.1.15...v0.1.16) (2026-02-10)
15
+
16
+ **Note:** Version bump only for package @startupjs-ui/tabs
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.1.11](https://github.com/startupjs/startupjs-ui/compare/v0.1.10...v0.1.11) (2026-01-20)
7
23
 
8
24
  **Note:** Version bump only for package @startupjs-ui/tabs
package/README.mdx CHANGED
@@ -5,26 +5,33 @@ import { Sandbox } from '@startupjs-ui/docs'
5
5
 
6
6
  # Tabs
7
7
 
8
- Inherits [react-native-tab-view](https://github.com/satya164/react-native-tab-view) with some changes:
8
+ Tabs let you switch between different views. Built on top of [react-native-tab-view](https://github.com/satya164/react-native-tab-view) with the following API changes:
9
9
 
10
- - `navigationState` property is replaced to properties `routes` and `$value`, where:
11
- - `routes` is have the same structure as `navigationState.routes`
12
- - `$value` is the scoped model, to make tabs controlled (by omitting this property the tabs will be uncontrolled)
13
- - added property `initialKey` to set default tab
14
- - added property `onChange` that responds to tab change instead of `onIndexChange`
15
- - all props for [TabBar](https://github.com/satya164/react-native-tab-view#tabbar) can be assigned to `Tabs` component
10
+ - The `navigationState` prop is replaced by `routes` and `$value`:
11
+ - `routes` has the same structure as `navigationState.routes` -- an array of `{ key, title }` objects.
12
+ - `$value` is a scoped model that controls which tab is active. Omit it to use uncontrolled mode.
13
+ - `initialKey` sets the default active tab for uncontrolled usage.
14
+ - `onChange` fires when the active tab changes, receiving the new tab key. It replaces `onIndexChange`.
15
+ - All [TabBar](https://github.com/satya164/react-native-tab-view#tabbar) props (such as `activeColor`, `inactiveColor`, `scrollEnabled`, `tabStyle`, `indicatorStyle`, `labelStyle`, `contentContainerStyle`, `indicatorContainerStyle`, `bounces`, `pressColor`, `pressOpacity`, `renderIcon`, `renderTabBarItem`, `renderIndicator`, `renderBadge`, `onTabPress`, `onTabLongPress`, `getLabelText`, `getAccessible`, `getAccessibilityLabel`, and `getTestID`) can be passed directly to the `Tabs` component.
16
16
 
17
- Tabs allow you to switch between different views.
17
+ The `renderScene` prop is used to render the content for each tab based on the route key.
18
+
19
+ You can also pass TabView props like `style`, `sceneContainerStyle`, `swipeEnabled`, `tabBarPosition`, `lazy`, `lazyPreloadDistance`, `renderLazyPlaceholder`, `initialLayout`, `keyboardDismissMode`, `onSwipeStart`, and `onSwipeEnd`.
20
+
21
+ Note: `tabsStyle` is a deprecated alias for `style`. The `renderLabel` prop is also deprecated -- use `renderTabBarItem` instead.
18
22
 
19
23
  ```jsx
20
24
  import { Tabs } from 'startupjs-ui'
21
25
  ```
22
26
 
23
27
  ## Tabs.Bar
24
- Use component `Tabs.Bar` in the `renderTabBar` function if you want to make a custom `TabBar`
28
+
29
+ Use the `Tabs.Bar` component inside the `renderTabBar` function to create a custom tab bar.
25
30
 
26
31
  ## Simple example
27
32
 
33
+ Define your routes as an array of `{ key, title }` objects and provide a `renderScene` function that returns the content for each tab.
34
+
28
35
  ```jsx example noscroll
29
36
  const [routes] = useState([
30
37
  { key: 'first', title: 'First' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs-ui/tabs",
3
- "version": "0.1.11",
3
+ "version": "0.1.19",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -8,7 +8,7 @@
8
8
  "types": "index.d.ts",
9
9
  "type": "module",
10
10
  "dependencies": {
11
- "@startupjs-ui/core": "^0.1.11",
11
+ "@startupjs-ui/core": "^0.1.19",
12
12
  "react-native-tab-view": "^4.1.2"
13
13
  },
14
14
  "peerDependencies": {
@@ -17,5 +17,5 @@
17
17
  "react-native-pager-view": "*",
18
18
  "startupjs": "*"
19
19
  },
20
- "gitHead": "b21659a9d8408cd921560196db22a18fd8eda82d"
20
+ "gitHead": "bfcca786dc363f42a09b6eef4feb7ca8139302fc"
21
21
  }