React Native GuideKit is a library that makes it easy to implement interactive user guide tours in React Native apps. It provides intuitive onboarding experiences through mask overlays and tooltips.
- Version: 1.1.0
- Release Date: 2024-12-19
- License: ISC
- Author: Jindol wlstjrghdud@naver.com
- π― Mask Guide: Mask overlay to highlight specific UI elements
- π¬ Custom Tooltips: Support for 6 positions (top/bottom + left/center/right)
- π Sequential Guide: Progress through multiple guide steps in order
- π± Cross Platform: Support for iOS, Android, and Web
- β‘ TypeScript: Full type support for enhanced developer experience
- π¨ Customization: Customizable tooltip content, buttons, and styling
{
"name": "react-native-guidekit",
"version": "1.1.0",
"repository": "git@github.com:yeojinseok/react-native-guidekit.git"
}- React: ^18.2.0
- React Native: ^0.75.0
- React Native SVG: ^15.12.0
- React Native Paper: ^5
- β iOS
- β Android
- β Web (React Native Web)
npm install react-native-guidekityarn add react-native-guidekitInstall the required peer dependencies:
npm install react-native-svg react-native-paper
# λλ
yarn add react-native-svg react-native-paperAdditional setup is required to use SVG on iOS:
cd ios && pod installSet up the GuideKitProvider at the top level of your app:
import React from "react";
import * as GuideKit from "react-native-guidekit";
export default function App() {
return (
<GuideKit.GuideKitProvider>
{/* Rest of your app components */}
<YourAppContent />
</GuideKit.GuideKitProvider>
);
}Wrap the component you want to guide with GuideMaskSection:
import * as GuideKit from "react-native-guidekit";
import { View, Text } from "react-native";
function MyComponent() {
return (
<GuideKit.GuideMaskSection
guideKey="welcome-message"
type="mask"
onPress={() => console.log("Guide area clicked!")}
tooltip={{
arrowPosition: "topLeft",
position: "bottomLeft",
title: <Text>Welcome!</Text>,
content: <Text>You can check key features here.</Text>,
buttonText: <Text>Next</Text>,
}}
>
<View>
<Text>Component to guide</Text>
</View>
</GuideKit.GuideMaskSection>
);
}Start the guide using the hook:
import React from "react";
import { Button } from "react-native";
import * as GuideKit from "react-native-guidekit";
function StartGuideButton() {
const { startGuide } = GuideKit.useGuideKitState();
const handleStartGuide = () => {
startGuide({
guideKeyList: ["welcome-message", "feature-button", "settings-menu"],
onComplete: () => {
console.log("Guide completed!");
},
onClose: () => {
console.log("Guide closed");
},
});
};
return <Button title="Start Guide" onPress={handleStartGuide} />;
}A context provider that wraps the entire app.
<GuideKitProvider>{children}</GuideKitProvider>A component that marks the area to be guided.
interface GuideMaskSectionProps {
guideKey: string; // Unique identifier
type: "mask"; // Guide type (currently only mask is supported)
maskPadding?: number; // Mask padding (default: 8px)
onPress?: () => void; // Callback when area is clicked
tooltip?: {
position?: PointerPositionType; // Tooltip position
title?: React.ReactNode; // Title
content?: React.ReactNode; // Content
buttonText?: React.ReactNode; // Button text
onPressButton?: () => void; // Button click callback
arrowPosition: PointerPositionType; // Arrow position
};
children: React.ReactNode;
}A hook for managing guide state.
const {
currentGuideInfo, // Current guide information
currentGuideKey, // Current guide key
startGuide, // Function to start guide
} = useGuideKitState();type PointerPositionType =
| "topLeft"
| "topRight"
| "bottomLeft"
| "bottomRight"
| "topCenter"
| "bottomCenter";const multiStepGuide = () => {
startGuide({
guideKeyList: [
"step1-welcome",
"step2-features",
"step3-settings",
"step4-complete",
],
onComplete: () => {
// Execute when all steps are completed
AsyncStorage.setItem("onboarding_completed", "true");
},
});
};const conditionalGuide = async () => {
const hasSeenGuide = await AsyncStorage.getItem("has_seen_guide");
if (!hasSeenGuide) {
startGuide({
guideKeyList: ["welcome"],
onComplete: () => {
AsyncStorage.setItem("has_seen_guide", "true");
},
});
}
};<GuideMaskSection
guideKey="custom-style"
tooltip={{
position: "topCenter",
arrowPosition: "bottomCenter",
title: (
<Text style={{ fontSize: 18, fontWeight: "bold", color: "#333" }}>
Custom Title
</Text>
),
content: (
<View>
<Text style={{ color: "#666", lineHeight: 20 }}>
Can include multi-line description text.
</Text>
<Text style={{ color: "#007AFF", marginTop: 8 }}>
Additional information or links are also possible.
</Text>
</View>
),
buttonText: <Text style={{ color: "white" }}>OK</Text>,
}}
>
<YourComponent />
</GuideMaskSection># Clone repository
git clone git@github.com:yeojinseok/react-native-guidekit.git
cd react-native-guidekit
# Install dependencies
npm install
# Build library
npm run build
# Run example app
cd example
npm install
npm run ios # iOS
npm run android # Android
npm run web # Webreact-native-guidekit/
βββ src/ # Library source
β βββ components/ # React components
β βββ hooks/ # Custom hooks
β βββ types.ts # TypeScript types
β βββ index.ts # Public API
βββ example/ # Demo app
βββ docs/ # Documentation
βββ lib/ # Build output
- Create an issue or check existing issues
- Fork and create a feature branch
- Implement changes and test
- Create PR and request code review
ISC License - See LICENSE file for details.
- GitHub: yeojinseok/react-native-guidekit
- NPM: react-native-guidekit
- Issue Reports: GitHub Issues
If you encounter problems or have questions:
- Report issues on GitHub Issues
- Email: wlstjrghdud@naver.com
Thank you for using React Native GuideKit! π