@nativescript-community/ui-appbar 0.0.0-stage → 1.0.0

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,23 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## 1.0.0 (2026-10-18)
7
+
8
+ ### Features
9
+
10
+ * hideOnScroll for the floating action button and bottom navigation bar, app bar docs ([db77d43](https://github.com/nativescript-community/ui-material-components/commit/db77d43097eb1188a053420d955264ad842059d5))
11
+ * native-api-usage.json for every package on Android and iOS ([cfd7dcc](https://github.com/nativescript-community/ui-material-components/commit/cfd7dcc4b996b02319cfacee233bc56c29df70e4))
12
+ * **ui-appbar:** a view inside an appBarItem is its actionView (uibutton in the bar) ([dcb9a7f](https://github.com/nativescript-community/ui-material-components/commit/dcb9a7f4fbeb04955558ce42408fca079a78467c))
13
+ * **ui-appbar:** action items with menu / prominent, search (UISearchController / SearchView) ([5b59641](https://github.com/nativescript-community/ui-material-components/commit/5b596415b3891ed375a6969f57f1e006f750c200))
14
+ * **ui-appbar:** Android searchMode=bar (Material 3 SearchBar + SearchView, searchContent) ([5bae2cb](https://github.com/nativescript-community/ui-material-components/commit/5bae2cbfffa68586779e4c569bb4152c43d5f54b))
15
+ * **ui-appbar:** AppBar (size, scroll behavior, subtitle, spans, translucent, scrollTarget) for Android and iOS ([75f8aee](https://github.com/nativescript-community/ui-material-components/commit/75f8aee2a5c513de549345083051499566016287))
16
+ * **ui-appbar:** AppPage spike (Coordinator nested in the Page root, gesturehandler compatible) ([0c063c3](https://github.com/nativescript-community/ui-material-components/commit/0c063c33b1c5c875605642ac81406d4778c9dbe4))
17
+ * **ui-appbar:** badges on items and bottom items, iOS 26 searchPlacement ([d262fb5](https://github.com/nativescript-community/ui-material-components/commit/d262fb588cb30842eeb237fe00184d06a945eea1))
18
+ * **ui-appbar:** bottomItems (UIToolbar / BottomAppBar), inline title of collapsed pushed large titles on iOS ([baab2b7](https://github.com/nativescript-community/ui-material-components/commit/baab2b79a134c7f717cd31179d4fd0d0ad0069c3))
19
+ * **ui-appbar:** page overlay, hide for large bars, translucent bar with content under it (iOS blur, Android tint) ([05e7a88](https://github.com/nativescript-community/ui-material-components/commit/05e7a88372a2b78404f3069acc01678596ef74e7))
20
+
21
+ ### Bug Fixes
22
+
23
+ * **ui-appbar:** Android bar surface, modern tinted icons, lift, translucent small/large, keyboard and search layout ([c08c549](https://github.com/nativescript-community/ui-material-components/commit/c08c54918c0cc3f61f4a3dc08c30705bd4ab650c))
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright {yyyy} {name of copyright owner}
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,280 @@
1
- # Temporary Holding Version
1
+ <!-- ⚠️ This README has been generated from the file(s) "blueprint.md" ⚠️-->
2
+ <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11
+ DO NOT EDIT THIS READEME DIRECTLY! Edit "bluesprint.md" instead.
12
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
13
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
17
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
19
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
20
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
21
+ <h1 align="center">@nativescript-community/ui-appbar</h1>
22
+ <p align="center">
23
+ <a href="https://npmcharts.com/compare/@nativescript-community/ui-appbar?minimal=true"><img alt="Downloads per month" src="https://img.shields.io/npm/dm/@nativescript-community/ui-appbar.svg" height="20"/></a>
24
+ <a href="https://www.npmjs.com/package/@nativescript-community/ui-appbar"><img alt="NPM Version" src="https://img.shields.io/npm/v/@nativescript-community/ui-appbar.svg" height="20"/></a>
25
+ </p>
2
26
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
27
+ <p align="center">
28
+ <b>App bar and page: Material top app bar (collapsing, lift on scroll) on Android, native navigation bar on iOS</b></br>
29
+ <sub><sub>
30
+ </p>
31
+
32
+ <br />
33
+
34
+
35
+ | iOS | Android |
36
+ | --- | --- |
37
+ | <img src="https://github.com/nativescript-community/ui-native-components/raw/master/images/ui-appbar-ios.png" height="500" /> | <img src="https://github.com/nativescript-community/ui-native-components/raw/master/images/ui-appbar-android.png" height="500" /> |
38
+
39
+
40
+ [](#table-of-contents)
41
+
42
+ ## Table of Contents
43
+
44
+ * [Installation](#installation)
45
+ * [Usage](#usage)
46
+ * [API](#api)
47
+ * [Items](#items)
48
+ * [Hide on scroll](#hide-on-scroll)
49
+ * [Bottom items](#bottom-items)
50
+ * [Overlay](#overlay)
51
+ * [Demos and Development](#demos-and-development)
52
+ * [Repo Setup](#repo-setup)
53
+ * [Build](#build)
54
+ * [Demos](#demos)
55
+ * [Contributing](#contributing)
56
+ * [Update repo ](#update-repo-)
57
+ * [Update readme ](#update-readme-)
58
+ * [Update doc ](#update-doc-)
59
+ * [Publish](#publish)
60
+ * [modifying submodules](#modifying-submodules)
61
+ * [Questions](#questions)
62
+
63
+
64
+ [](#installation)
65
+
66
+ ## Installation
67
+
68
+ ```bash
69
+ npm install @nativescript-community/ui-appbar
70
+ ```
71
+
72
+ The Android components use **Material 3**: see the [repository README](https://github.com/nativescript-community/ui-native-components#installation) for the theme.
73
+
74
+
75
+ [](#usage)
76
+
77
+ ## Usage
78
+
79
+ | | Android | iOS |
80
+ |---|---|---|
81
+ | `AppPage` | Page whose content is in a `CoordinatorLayout` (nested in the Page root: compatible with gesturehandler) | regular Page |
82
+ | `AppBar` | `MaterialToolbar` in an `AppBarLayout`, M3 `CollapsingToolbarLayout` for `medium` / `large` | the navigation bar (Liquid Glass buttons on iOS 26), large title |
83
+
84
+ ```svelte
85
+ <appPage>
86
+ <appBar title="Inbox" subtitle="3 unread" size="large" scrollBehavior="lift" />
87
+ <collectionview ... />
88
+ </appPage>
89
+ ```
90
+
91
+ Register the svelte elements once (`registerElement` of svelte-native): `import { register } from '@nativescript-community/ui-appbar/svelte'; register();`.
92
+
93
+
94
+ [](#api)
95
+
96
+ ## API
97
+
98
+ | property | |
99
+ |---|---|
100
+ | `size` | `small` (default), `medium`, `large`: title that collapses with the scroll |
101
+ | `scrollBehavior` (Android notes: the surface of the bar is the AppBarLayout, the toolbar is flat and transparent; the icons follow the css `color`, the surface the css `background-color`, else the theme colors; `lift` changes the surface color and the status bar area follows) | `none`, `lift` (elevation / separator only when content scrolls under the bar), `hide` (the whole bar, also a large one, leaves the screen when scrolling down and comes back when scrolling up) |
102
+ | `subtitle`, `formattedTitle` | subtitle, title with spans |
103
+ | `translucent` | the content scrolls under the bar, which is see through: iOS a blur tinted with the color of the bar, Android the color of the bar at 85%. Set `scrollTarget`; the scrolling view must be the content of the page (iOS) |
104
+ | `searchable`, `searchHint` | search: iOS `UISearchController` under the title, Android a collapsible `SearchView` action. Events `searchChange`, `searchSubmit`, `searchCancel` (`text`) |
105
+ | `searchMode` | Android: `collapsible` (default, a search icon in the bar) or `bar` (Material 3 `SearchBar` under the title which opens a full screen `SearchView`; its suggestions / results go in `<appPageSearchContent>`, a child of the page) |
106
+ | `searchPlacement` | iOS 26: where the search bar goes: `stacked` (under the title, default), `integrated` (a glass button / field in the bar), `integratedButton`, `integratedCentered`, `automatic` |
107
+ | `scrollTarget` | the scrolling view the bar follows (iOS: `setContentScrollView`) |
108
+
109
+ Status and limits: see [APPBAR_PLAN.md](../../APPBAR_PLAN.md). On iOS a large title on a pushed page uses the UIKit `Always` mode, which never shows the inline title: a title view is shown while the bar is collapsed (the height of the bar tells). On the root page of the Frame UIKit does it.
110
+ On Android the bar draws under the status bar (edge to edge) and the page handles the inset.
111
+
112
+
113
+ [](#items)
114
+
115
+ ## Items
116
+
117
+ `<appBarItem>` is the core `ActionItem` with `menu` (items of `@nativescript-community/ui-menu`: iOS native menu of the bar button, Android popup menu) and `prominent` (iOS 26 tinted glass).
118
+
119
+ ```svelte
120
+ <appBar title="Inbox">
121
+ <appBarItem text="More" icon="sys://ellipsis" menu={[{ title: 'Share', onSelect }, { separator: true }, { title: 'Delete', destructive: true }]} />
122
+ <appBarItem text="Edit" prominent />
123
+ </appBar>
124
+ ```
125
+
126
+
127
+ [](#hide-on-scroll)
128
+
129
+ ## Hide on scroll
130
+
131
+ `hideOnScroll` (the scrolling view) of `@nativescript-community/ui-floatingactionbutton` and `@nativescript-community/ui-bottomnavigationbar`: hidden when the content scrolls down, shown when it scrolls up.
132
+
133
+ ```svelte
134
+ <appPage>
135
+ <appBar searchable searchMode="bar" on:searchChange={(e) => (query = e.text)} />
136
+ <collectionview ... />
137
+ <appPageSearchContent><label text="results for {query}" /></appPageSearchContent>
138
+ </appPage>
139
+ ```
140
+ On iOS `searchMode` and `searchContent` are ignored: the `UISearchController` is used, filter the main content from `searchChange`.
141
+
142
+ `badge` on an item (and on a bottom item): a number, a text or `true` (a dot). Android `BadgeDrawable`, iOS 26 `UIBarButtonItemBadge` (the iOS 26.5 bottom toolbar does not draw it, the navigation bar does).
143
+
144
+ A view inside the item is its `actionView`: use our components in the bar. The view gets its own `tap` event.
145
+ On iOS 26 the system puts it in a Liquid Glass capsule, use a plain / text variant of the button.
146
+
147
+ ```svelte
148
+ <appBarItem ios.position="right" android.position="actionBar">
149
+ <uibutton text="Go" variant="text" on:tap={go} />
150
+ </appBarItem>
151
+ ```
152
+
153
+
154
+ [](#bottom-items)
155
+
156
+ ## Bottom items
157
+
158
+ `bottomItems` (`{ text, icon, spacer, onTap }`, event `bottomItemTap`): iOS the bottom toolbar of the navigation controller (Liquid Glass buttons on iOS 26, `spacer` is a flexible space), Android a Material `BottomAppBar` (with `scrollBehavior="hide"` it hides on scroll; the actions are at the start, `spacer` is ignored).
159
+ The last items of the `scrollTarget` stay above the Android bar.
160
+
161
+ ```svelte
162
+ <appBar bottomItems={[{ icon: 'sys://house', text: 'Home', onTap }, { spacer: true }, { icon: 'sys://plus', text: 'Add', onTap }]} />
163
+ ```
164
+
165
+
166
+ [](#overlay)
167
+
168
+ ## Overlay
169
+
170
+ Views anchored to the page itself (a FAB, a bottom bar) go in `<appPageOverlay>`, not in the page content: on Android the content of an `AppPage` is taller than the screen while a medium / large bar is expanded, so a bottom anchored view would be off screen.
171
+ On iOS the overlay is laid out over the content, inside the safe area; its empty areas let the touches go through.
172
+
173
+ ```svelte
174
+ <appPage>
175
+ <appBar ... />
176
+ <collectionview ... />
177
+ <appPageOverlay>
178
+ <uifloatingactionbutton verticalAlignment="bottom" horizontalAlignment="right" />
179
+ </appPageOverlay>
180
+ </appPage>
181
+ ```
182
+
183
+
184
+ [](#demos-and-development)
185
+
186
+ ## Demos and Development
187
+
188
+
189
+ ### Repo Setup
190
+
191
+ The repo uses submodules. If you did not clone with ` --recursive` then you need to call
192
+ ```
193
+ git submodule update --init
194
+ ```
195
+
196
+ The package manager used to install and link dependencies must be `pnpm` or `yarn`. `npm` wont work.
197
+
198
+ To develop and test:
199
+ if you use `yarn` then run `yarn`
200
+ if you use `pnpm` then run `pnpm i`
201
+
202
+ **Interactive Menu:**
203
+
204
+ To start the interactive menu, run `npm start` (or `yarn start` or `pnpm start`). This will list all of the commonly used scripts.
205
+
206
+ ### Build
207
+
208
+ ```bash
209
+ npm run build.all
210
+ ```
211
+ WARNING: it seems `yarn build.all` wont always work (not finding binaries in `node_modules/.bin`) which is why the doc explicitly uses `npm run`
212
+
213
+ ### Demos
214
+
215
+ ```bash
216
+ npm run demo.[ng|react|svelte|vue].[ios|android]
217
+
218
+ npm run demo.svelte.ios # Example
219
+ ```
220
+
221
+ Demo setup is a bit special in the sense that if you want to modify/add demos you dont work directly in `demo-[ng|react|svelte|vue]`
222
+ Instead you work in `demo-snippets/[ng|react|svelte|vue]`
223
+ You can start from the `install.ts` of each flavor to see how to register new demos
224
+
225
+
226
+ [](#contributing)
227
+
228
+ ## Contributing
229
+
230
+ ### Update repo
231
+
232
+ You can update the repo files quite easily
233
+
234
+ First update the submodules
235
+
236
+ ```bash
237
+ npm run update
238
+ ```
239
+
240
+ Then commit the changes
241
+ Then update common files
242
+
243
+ ```bash
244
+ npm run sync
245
+ ```
246
+ Then you can run `yarn|pnpm`, commit changed files if any
247
+
248
+ ### Update readme
249
+ ```bash
250
+ npm run readme
251
+ ```
252
+
253
+ ### Update doc
254
+ ```bash
255
+ npm run doc
256
+ ```
257
+
258
+ ### Publish
259
+
260
+ The publishing is completely handled by `lerna` (you can add `-- --bump major` to force a major release)
261
+ Simply run
262
+ ```shell
263
+ npm run publish
264
+ ```
265
+
266
+ ### modifying submodules
267
+
268
+ The repo uses https:// for submodules which means you won't be able to push directly into the submodules.
269
+ One easy solution is t modify `~/.gitconfig` and add
270
+ ```
271
+ [url "ssh://git@github.com/"]
272
+ pushInsteadOf = https://github.com/
273
+ ```
274
+
275
+
276
+ [](#questions)
277
+
278
+ ## Questions
279
+
280
+ If you have any questions/issues/comments please feel free to create an issue or start a conversation in the [NativeScript Community Discord](https://nativescript.org/discord).
@@ -0,0 +1,101 @@
1
+ import { ActionBar, ActionItem, EventData, FormattedString, GridLayout, ImageSource, Property, View } from '@nativescript/core';
2
+ import { MenuItem } from '@nativescript-community/ui-menu';
3
+ /** small: standard bar, medium / large: a title that collapses on scroll (M3 collapsing app bar on Android, large title on iOS) */
4
+ export type AppBarSize = 'small' | 'medium' | 'large';
5
+ /**
6
+ * none: the bar stays,
7
+ * lift: the bar gets an elevation / separator only when the content scrolls under it,
8
+ * hide: the bar leaves the screen when scrolling down and comes back when scrolling up
9
+ */
10
+ export type AppBarScrollBehavior = 'none' | 'lift' | 'hide';
11
+ export declare const sizeProperty: Property<AppBarBase, AppBarSize>;
12
+ export declare const scrollBehaviorProperty: Property<AppBarBase, AppBarScrollBehavior>;
13
+ export declare const subtitleProperty: Property<AppBarBase, string>;
14
+ export declare const formattedTitleProperty: Property<AppBarBase, FormattedString>;
15
+ export declare const translucentProperty: Property<AppBarBase, boolean>;
16
+ export declare const searchableProperty: Property<AppBarBase, boolean>;
17
+ export declare const searchHintProperty: Property<AppBarBase, string>;
18
+ export declare const scrollTargetProperty: Property<AppBarBase, View>;
19
+ export declare const badgeProperty: Property<AppBarItem, string | number | boolean>;
20
+ export declare const menuProperty: Property<AppBarItem, MenuItem[]>;
21
+ export declare const prominentProperty: Property<AppBarItem, boolean>;
22
+ /**
23
+ * An action of the bar. In addition to the core `ActionItem` (text, icon, `actionView`, `android.position`...):
24
+ * - `menu`: items of a menu shown when the action is tapped (iOS: native menu of the bar button, Android: popup menu)
25
+ * - `prominent`: iOS 26 tinted Liquid Glass button
26
+ */
27
+ export declare class AppBarItem extends ActionItem {
28
+ menu: MenuItem[];
29
+ prominent: boolean;
30
+ /** a badge on the action: a number, a text, or `true` for a dot. iOS 26 and Android */
31
+ badge: string | number | boolean;
32
+ _addChildFromBuilder(name: string, value: any): void;
33
+ _raiseTap(): void;
34
+ }
35
+ export interface AppBarSearchEventData extends EventData {
36
+ text: string;
37
+ }
38
+ /**
39
+ * An action of the bottom bar (`bottomItems`): iOS a button of the bottom toolbar (Liquid Glass on iOS 26), Android an action of the Material `BottomAppBar`.
40
+ */
41
+ export interface AppBarBottomItem {
42
+ /** `sys://name` (SF Symbol, iOS), `res://name` or a file path, an ImageSource, or a FormattedString */
43
+ icon?: string | ImageSource | FormattedString;
44
+ text?: string;
45
+ /** iOS: a flexible space between the buttons. Android: ignored (the actions are at the end of the bar) */
46
+ spacer?: boolean;
47
+ /** a badge on the action: a number, a text, or `true` for a dot */
48
+ badge?: string | number | boolean;
49
+ /** called when the action is tapped */
50
+ onTap?: (item: AppBarBottomItem) => void;
51
+ [key: string]: any;
52
+ }
53
+ /** collapsible: a search icon in the bar that expands (Android SearchView action). bar: Android Material 3 `SearchBar` under the title that opens a full screen `SearchView`. iOS: always the `UISearchController` */
54
+ export type AppBarSearchMode = 'collapsible' | 'bar';
55
+ export declare const searchModeProperty: Property<AppBarBase, AppBarSearchMode>;
56
+ /** iOS 26 placement of the search bar of the navigation bar: stacked (under the title, default), integrated (a field / button in the bar), integratedButton (always a button), integratedCentered (centered on iPad), automatic */
57
+ export type AppBarSearchPlacement = 'automatic' | 'stacked' | 'integrated' | 'integratedButton' | 'integratedCentered';
58
+ export declare const searchPlacementProperty: Property<AppBarBase, AppBarSearchPlacement>;
59
+ export declare const bottomItemsProperty: Property<AppBarBase, AppBarBottomItem[]>;
60
+ export declare class AppBarBase extends ActionBar {
61
+ static bottomItemTapEvent: string;
62
+ /** actions of a bar at the bottom of the page: iOS the bottom toolbar, Android a `BottomAppBar` */
63
+ bottomItems: AppBarBottomItem[];
64
+ /** raised when the text of the search changes */
65
+ static searchChangeEvent: string;
66
+ /** raised when the search is submitted (keyboard search key) */
67
+ static searchSubmitEvent: string;
68
+ /** raised when the search is closed / cancelled */
69
+ static searchCancelEvent: string;
70
+ /** adds a search: iOS `UISearchController` under the title, Android a collapsible `SearchView` action */
71
+ searchable: boolean;
72
+ searchHint: string;
73
+ searchMode: AppBarSearchMode;
74
+ searchPlacement: AppBarSearchPlacement;
75
+ /** the current text of the search (read only) */
76
+ searchText: string;
77
+ size: AppBarSize;
78
+ scrollBehavior: AppBarScrollBehavior;
79
+ subtitle: string;
80
+ /** the title with spans (needs `@nativescript-community/text` for the full support) */
81
+ formattedTitle: FormattedString;
82
+ /** the content goes under the bar, the bar is see through until the content scrolls */
83
+ translucent: boolean;
84
+ /** the scrolling view (collectionview, scrollview...) that drives the bar. By default the first one found */
85
+ scrollTarget: View;
86
+ onAppBarPropertyChanged(): void;
87
+ }
88
+ /**
89
+ * Layout for the views anchored to the page itself (a floating action button, a bottom bar...), not to the scrolling content: use it as the `overlay` of an AppPage.
90
+ * Android: the content of an AppPage is taller than the screen while the bar is expanded (the content moves up when the bar collapses), so a view anchored to the bottom of the content would be off screen.
91
+ */
92
+ export declare class AppPageOverlay extends GridLayout {
93
+ constructor();
94
+ }
95
+ /** raises the tap of a bottom item: the `onTap` of the item and the `bottomItemTap` event of the bar */
96
+ export declare function notifyBottomItemTap(bar: AppBarBase, item: AppBarBottomItem): void;
97
+ /**
98
+ * Android `searchMode="bar"`: the content of the full screen search (suggestions, results): use it as the `searchContent` of an AppPage. Ignored on iOS.
99
+ */
100
+ export declare class AppPageSearchContent extends GridLayout {
101
+ }