UNPKG

expo-onboarding

Version:

Dead simple onboarding for your React Native/Expo app.

60 lines 3.05 kB
import { OnboardingViewProps } from './Onboarding.types'; /** * OnboardingView - A beautiful, animated onboarding component for React Native apps. * * This component creates a sleek introduction screen that showcases your app's key features * with smooth animations, SF Symbols integration, and highly customizable styling options. * Perfect for first-time user experiences and feature introductions. * * Features: * - Smooth fade-in and slide-up animations * - SF Symbols integration for consistent iconography * - Customizable typography and colors * - Support for feature links and interactive elements * - Responsive design that adapts to different screen sizes * - Built-in blur effects and modern styling * * @param features {OnboardingFeature[]} Array of features to display in the onboarding flow. Each feature object contains: * - `title`: The feature's display title * - `description`: Detailed explanation (supports rich text links) * - `systemImage`: SF Symbol name (e.g., "star.fill", "lock.shield.fill") * - `icon`: Optional custom React component for Android (overrides systemImage) * - `links`: Optional array of text segments to make clickable * @param icon {ImageSourcePropType} The app icon to display at the top. Accepts require() paths, URIs, or image objects. * @param appName {string} Your app's display name shown prominently at the top of the screen. * @param tintColor {string} Primary brand color for icons, links, and accents (hex, rgb, or named color). * @param titleStyle {object} Typography styling for the main app title: * - `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, `color` * @param featureTitleStyle {object} Typography styling for each feature's title: * - `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, `color` * @param featureDescriptionStyle {object} Typography styling for each feature's description: * - `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, `color` * @param ButtonComponent {ComponentType} React component for rendering interactive buttons and links. * * @example * ```tsx * <OnboardingView * appName="My Amazing App" * icon={require('./assets/app-icon.png')} * tintColor="#007AFF" * features={[ * { * title: "Fast & Reliable", * description: "Experience lightning-fast performance", * systemImage: "bolt.fill" * }, * { * title: "Secure by Design", * description: "Your data is protected with end-to-end encryption", * systemImage: "lock.shield.fill" * } * ]} * titleStyle={{ fontSize: 28, fontWeight: 'bold' }} * featureTitleStyle={{ fontSize: 18, fontWeight: '600' }} * featureDescriptionStyle={{ fontSize: 16, color: '#666' }} * ButtonComponent={MyCustomButton} * /> * ``` */ export default function OnboardingView({ appName, icon, features, titleStyle, featureTitleStyle, featureDescriptionStyle, tintColor, ButtonComponent, }: OnboardingViewProps): import("react").JSX.Element; //# sourceMappingURL=OnboardingView.d.ts.map