Mini Sheet Snackbar

A hybrid snackbar/bottom-sheet for more complex notifications with actions.

Component Features and Props

How to Use Mini Sheet Snackbar Component

Installation Guide for Mini Sheet Snackbar

Component Props

Specifications
PropTypeDefaultDescription
visibleReqboolean-Control visibility
titleReqstring-Sheet title
descriptionReqstring-Sheet description
actionsAction[]-Array of action buttons
theme'light' | 'dark'lightColor theme
onCloseReq() => void-Close callback

Install

TERMINAL
$ npx expo install react-native

Component Code

Component.tsx
1import React, { useEffect, useRef } from 'react';
2import {
3    StyleSheet,
4    View,
5    Text,
6    Animated,
7    PanResponder,
8    Dimensions,
9    TouchableOpacity,
10    Platform,
11} from 'react-native';
12
13const { height: SCREEN_HEIGHT } = Dimensions.get('window');
14const SHEET_HEIGHT = 220;
15
16interface Action {
17    label: string;
18    onPress: () => void;
19    primary?: boolean;
20}

Usage

Usage.tsx
// mini-sheet-snackbar
import React, { useState } from 'react';
import { StyleSheet, View, Text, TouchableOpacity, SafeAreaView, StatusBar } from 'react-native';
import MiniSheetSnackbar from './components/MiniSheetSnackbar';

export default function App() {
    const [sheetVisible, setSheetVisible] = useState(false);

    const handleAction = (type: string) => {
        console.log(`${type} pressed`);
        setSheetVisible(false);
    };

    return (
        <SafeAreaView style={styles.container}>
            <StatusBar barStyle="dark-content" />

            <View style={styles.main}>
                <Text style={styles.logo}>Uilora</Text>
                <Text style={styles.sub}>Component Library</Text>
100%
Mini Sheet Snackbar - React Native Toast & Snackbar Notification | Uilora | Uilora