Progress Snackbar

Snackbar with an integrated progress bar for long-running tasks.

Component Features and Props

How to Use Progress Snackbar Component

Installation Guide for Progress Snackbar

Component Props

Specifications
PropTypeDefaultDescription
visibleReqboolean-Control visibility
progressReqnumber-Progress 0-100
labelReqstring-Status label
themeColorstring#6366f1Custom tint color

Install

TERMINAL
$ npx expo install react-native

Component Code

Component.tsx
1import React, { useEffect, useRef } from 'react';
2import {
3    View,
4    Text,
5    StyleSheet,
6    Animated,
7    Dimensions,
8    Platform
9} from 'react-native';
10
11interface ProgressSnackbarProps {
12    visible: boolean;
13    progress: number; // 0 to 100
14    label: string;
15    themeColor?: string;
16}
17
18const ProgressSnackbar = ({
19    visible,
20    progress,

Usage

Usage.tsx
import React, { useState, useEffect } from 'react';
import { StyleSheet, View, Text, TouchableOpacity, SafeAreaView } from 'react-native';
import ProgressSnackbar from './components/ProgressSnackbar';

export default function App() {
    const [isUploading, setIsUploading] = useState(false);
    const [progress, setProgress] = useState(0);

    const startUpload = () => {
        if (isUploading) return;

        setIsUploading(true);
        setProgress(0);
    };

    // Mock upload logic
    useEffect(() => {
        let interval: any;
        if (isUploading && progress < 100) {
            interval = setInterval(() => {
100%
Progress Snackbar - React Native Toast & Snackbar Notification | Uilora | Uilora