@@ -212,11 +212,137 @@ export const AppBodyLargeText: React.FC<PropsWithChildren> = ({children}) => {
212212![ linear activity indicator gif] ( https://ik.imagekit.io/Computools/rn-material-components/linear-indicator-gif.gif?updatedAt=1705066319092 )
213213</details >
214214</details >
215- <details ><summary >Badge</summary >
215+ <details ><summary >App Bars</summary >
216+ <br />
217+ <details ><summary >Bottom App Bar</summary >
216218<br />
217219
218220** Properties**
219221
222+ | name | description | type | default |
223+ | ------ | ------ | ------ | ----|
224+ | iconButtons | required | IconButtonProps[ ] | - |
225+ | scrollDirection | UP or DOWN | sharedValue<ScrollDirection > | UP |
226+ | FabIcon | Pass an icon to show FAB | React.FC | - |
227+ | fabLabel | - | string | - |
228+ | animationDelay | - | number | 80 |
229+ | animationDumping | - | number | 20 |
230+ | onFabPress | - | () => void | - |
231+
232+ To enable animation on scroll use ScrollView from Animated, create a shared value with a ScrollDirection value, scrollContext with a number value and manage them onScroll.
233+
234+ See the example:
235+ ```
236+ export const MyComponent: React.FC = () => {
237+ const scrollDirection = useSharedValue(ScrollDirection.UP);
238+ const scrollContext = useSharedValue(0);
239+
240+ const onScroll = (e: NativeSyntheticEvent<NativeScrollEvent>) => {
241+ const currentOffsetY = e.nativeEvent.contentOffset.y;
242+
243+ if (currentOffsetY <= 0 || currentOffsetY < scrollContext.value) {
244+ scrollDirection.value = ScrollDirection.UP;
245+ } else if (currentOffsetY >= scrollContext.value) {
246+ scrollDirection.value = ScrollDirection.DOWN;
247+ }
248+
249+ scrollContext.value = currentOffsetY;
250+ };
251+
252+ return (
253+ <>
254+ <Animated.ScrollView onScroll={onScroll}>
255+ <!-- scrollview content -->
256+ </Animated.ScrollView>
257+ <BottomAppBar scrollDirection={scrollDirection} />
258+ </>
259+ )
260+ }
261+
262+ ```
263+
264+ ![ bottom app bar] ( https://ik.imagekit.io/Computools/rn-material-components/bottom-app-bar.gif?updatedAt=1734086950022 )
265+
266+ </details >
267+ <details ><summary >Top App Bars</summary >
268+ <br />
269+
270+ To enable animation on scroll use ScrollView from Animated, create a shared value with ScrollStatus (0 if top is reached, 1 if target offset reached) value and manage it onScroll.
271+
272+ See the example:
273+ ```
274+ export const MyComponent: React.FC = () => {
275+ const scrollStatus = useSharedValue(0);
276+
277+ const onScroll = (e: NativeSyntheticEvent<NativeScrollEvent>) => {
278+ if (e.nativeEvent.contentOffset.y > 10) { // 10 is offset treashold when top app bar changes background color
279+ scrollStatus.value = 1;
280+ } else if (e.nativeEvent.contentOffset.y <= 10) {
281+ scrollStatus.value = 0;
282+ }
283+ };
284+
285+ return (
286+ <>
287+ <Animated.ScrollView onScroll={onScroll}>
288+ <!-- scrollview content -->
289+ </Animated.ScrollView>
290+ <TopAppBar scrollStatus={scrollStatus} />
291+ </>
292+ )
293+ }
294+ ```
295+
296+ ![ animated top app bar] ( https://ik.imagekit.io/Computools/rn-material-components/animated-top-app-bar.gif?updatedAt=1734088599114 )
297+
298+ <details ><summary >Center Aligned Top App Bar</summary >
299+ <br />
300+
301+ ** Properties**
302+
303+ | name | description | type | default |
304+ | ------ | ------ | ------ | ----|
305+ | title | required | string | - |
306+ | StartIcon | - | React.FC | - |
307+ | EndIcon | - | React.FC | - |
308+ | scrollStatus | 1 - scrolled down (backgoround color will changed); 0 - non-scrolled, top is reached | SharedValue<number > | - |
309+ | iconProps | - | T | - |
310+ | titleStyle | - | TextStyle | - |
311+ | defaultColor | - | ColorValue | - |
312+ | scrolledColor | - | ColorValue | - |
313+ | animationDuration | - | number | - |
314+
315+ ![ center aligned top app bar] ( https://ik.imagekit.io/Computools/rn-material-components/center_aligned_top_app_bar.png?updatedAt=1734088249862 )
316+ </details >
317+ <details ><summary >Top App Bar</summary >
318+ <br />
319+
320+ ** Properties**
321+
322+ | name | description | type | default |
323+ | ------ | ------ | ------ | ----|
324+ | title | required | string | - |
325+ | size | SMALL, MEDIUM, LARGE | TopAppBarSize | - |
326+ | StartIcon | - | React.FC | - |
327+ | actions | - | IconButtonProps<T >[ ] | - |
328+ | scrollStatus | 1 - scrolled down (backgoround color will changed); 0 - non-scrolled, top is reached | SharedValue<number > | - |
329+ | iconProps | - | T | - |
330+ | titleStyle | - | TextStyle | - |
331+ | defaultColor | - | ColorValue | - |
332+ | scrolledColor | - | ColorValue | - |
333+ | animationDuration | - | number | - |
334+
335+ ![ small top app bar] ( https://ik.imagekit.io/Computools/rn-material-components/small_top_app_bar.png?updatedAt=1734088346321 )
336+ ![ medium top app bar] ( https://ik.imagekit.io/Computools/rn-material-components/medium_top_app_bar.png?updatedAt=1734088346249 )
337+ ![ large top app bar] ( https://ik.imagekit.io/Computools/rn-material-components/large_top_app_bar.png?updatedAt=1734088346230 )
338+
339+ </details >
340+ </details >
341+ </details >
342+ <details ><summary >Badge</summary >
343+ </br >
344+
345+ ** Properties**
220346| name | description | type | default |
221347| ------ | ------ | ------ | ----|
222348| value | required | string | - |
0 commit comments