Instagram Story Share Export Template in React Native
Two mechanisms wear one button. Render the card off-screen, never screenshot the phone, and the share actually spreads.
TL;DR
An Instagram story share feature splits into two mechanisms: the system share sheet (the universal default via Share or expo-sharing) and direct-to-Instagram-Stories (the premium path needing a registered Facebook app and the URL-scheme contract). The shareable image is rendered from a dedicated off-screen card component at the 1080x1920 story canvas with react-native-view-shot, never screenshotted from the visible screen, with remote images preloaded before capture and load-bearing content kept out of Instagram's top and bottom safe zones. Offer save-to-camera-roll beside share, never auto-trigger, and always keep the share sheet as fallback. A free VP0 design supplies story-dimension card layouts.
What does “share to story” actually mean technically?
Two very different mechanisms wear the same button, and conflating them is where this feature goes wrong:
| Mechanism | What happens | What you need |
|---|---|---|
| Native share sheet | Your image enters the OS share flow; user picks any app | UIActivityViewController (RN’s Share / expo-sharing) |
| Direct-to-Instagram-Stories | Your asset opens Instagram’s story composer pre-filled | Instagram’s documented URL scheme + a registered Facebook app |
The generic share sheet is the safe default and covers most needs: render a card, hand it to the system, let the user send it to Stories, Messages, anywhere. The direct integration is the premium path, your branded sticker drops straight into Instagram’s editor with your background, attribution, and a swipe-up link, but it requires registering with Meta, declaring the URL scheme in LSApplicationQueriesSchemes, and passing assets through Instagram’s specific pasteboard contract. Build the share sheet first; add the direct path when the growth math justifies the Meta paperwork.
How is the shareable image generated?
By rendering a view to an image off-screen, never by screenshotting what is on screen. The user’s current screen is the wrong size, has the wrong chrome, and is the wrong moment; the share asset is a purpose-built composition (the score, the streak, the quote, the receipt) laid out at story dimensions and rasterized.
On the React Native side, react-native-view-shot captures a referenced component to a file or base64, and the discipline is to render a dedicated, off-screen “story card” component at 1080 by 1920 (the 9:16 story canvas) rather than capturing a visible view. Two details save the redo: capture at a fixed pixel size with result: 'tmpfile' and an explicit width and height so the output is crisp on every device regardless of screen density, and load any remote images (avatars, cover art) before capture, because a capture fired while an image is still loading rasterizes a blank box. The same off-screen-composition logic governs every generated-image feature, including the app-store screenshot automation where the asset is built to spec, not grabbed from a screen.
What does a story card owe its dimensions?
Respect for the safe zones, because Instagram overlays its own UI on the story canvas. The top roughly 250 pixels and bottom roughly 250 pixels of the 1920-tall canvas get covered by Instagram’s profile row, close button, and reply bar, so anything load-bearing, the headline number, the call to action, the logo, lives in the central safe band. A card that centers its content vertically looks fine in your preview and gets its punchline hidden behind Instagram’s reply field in the wild.
The card itself follows a settled grammar that makes shares actually spread: a strong central subject (the achievement, not the chrome), your brand mark small but present (this is organic distribution, attribution is the entire point), and high contrast that survives the dark and light story backgrounds users place behind it. Give users a small set of well-designed card variants rather than a freeform editor; the constraint is what keeps every shared card on-brand, the same curated-parts logic as a component registry keeping compositions coherent.
What completes the flow?
Permission honesty and the save alternative. If the card includes user photos pulled from the library, request access in context with a clear reason, and offer save to camera roll beside share, because a meaningful fraction of users want the image without posting it immediately, which needs photo-add permission (handled cleanly by @react-native-camera-roll/camera-roll at 298,865 weekly downloads, or expo-media-library). The expo-sharing and core Share APIs cover the send; the save path is a separate, equally-wanted action.
Two final honesty points. The direct-to-Instagram path can fail (app not installed, scheme blocked, user on Android with a different flow), so the share sheet must always be the fallback, never a dead end. And nothing about this feature should auto-trigger: a share prompt that fires unbidden after every action trains users to dismiss it, so surface it at genuine moments (a real achievement, a completed purchase) the way in-app rating prompts earn their single well-timed ask.
For the card designs and the share screen, a free VP0 design supplies story-dimension layouts with the safe zones already respected, so an agent generates the view-shot capture against compositions built for the 9:16 canvas instead of screenshotting a phone screen into a blurry rectangle.
The receiving side of the system share flow, where your app accepts a share from any other app, is built in the iOS share extension template.
Key takeaways: share-to-story done right
- Two mechanisms, one button: the system share sheet (default, universal) versus direct-to-Instagram (premium, needs Meta registration).
- Render off-screen to 1080x1920, never screenshot the visible screen; preload remote images before capture.
- Respect the safe zones: keep load-bearing content out of the top and bottom ~250px Instagram overlays.
- Offer save-to-camera-roll beside share, with in-context photo permission.
- Never auto-trigger, always provide the share-sheet fallback: the direct path can fail on any given device.
Frequently asked questions
How do I build an Instagram story share feature in React Native? Render a dedicated off-screen card component at 1080 by 1920 with react-native-view-shot, then pass the image to the system share sheet (Share or expo-sharing) as the universal path, optionally adding Instagram’s direct story URL scheme behind a Meta app registration. A free VP0 design supplies story-dimension card layouts to capture from.
Should I use the share sheet or integrate Instagram directly? Start with the system share sheet: it is one API, works for every destination, and needs no third-party registration. Add the direct-to-Stories integration only when its branded pre-filled composer justifies registering a Facebook app and maintaining the URL-scheme contract, and always keep the share sheet as the fallback.
Why does my shared story image look blurry or wrong-sized? You are likely screenshotting the visible screen instead of rendering a purpose-built card. Compose an off-screen view at the 1080 by 1920 story canvas, capture it at explicit pixel dimensions, and preload any remote images first so nothing rasterizes as a blank box.
How do I keep content visible on the Instagram story canvas? Keep load-bearing elements in the central safe band: Instagram overlays its profile row at the top and reply bar at the bottom, covering roughly the top and bottom 250 pixels of the 1920-tall canvas. Vertically centering content hides the punchline behind that chrome.
Should the app save the image as well as share it? Yes: many users want the asset without posting immediately, which needs photo-add permission and a save-to-camera-roll action beside share. Request the permission in context with a clear reason rather than upfront.
Other questions from VP0 builders
How do I build an Instagram story share feature in React Native?
Render a dedicated off-screen card component at 1080 by 1920 with react-native-view-shot, then hand the image to the system share sheet (Share or expo-sharing) as the universal path, optionally adding Instagram's direct story URL scheme behind a Meta app registration. A free VP0 design supplies story-dimension card layouts to capture from.
Should I use the share sheet or integrate Instagram directly?
Start with the system share sheet: one API, every destination, no third-party registration. Add direct-to-Stories only when its branded pre-filled composer justifies registering a Facebook app and maintaining the URL-scheme contract, and keep the share sheet as the fallback because the direct path can fail.
Why does my shared story image look blurry or the wrong size?
You are probably screenshotting the visible screen instead of rendering a purpose-built card. Compose an off-screen view at the 1080 by 1920 story canvas, capture it at explicit pixel dimensions, and preload remote images first so none rasterize as a blank box.
How do I keep content visible on the Instagram story canvas?
Keep load-bearing elements in the central safe band. Instagram overlays its profile row at the top and reply bar at the bottom, covering roughly the top and bottom 250 pixels of the 1920-tall canvas, so vertically centering content hides the punchline behind that chrome.
Should the app let users save the image too, not just share it?
Yes: many users want the asset without posting immediately, which needs photo-add permission and a save-to-camera-roll action beside share. Request that permission in context with a clear reason rather than upfront.
Part of the React Native & Expo: Mobile Frontend Architecture hub. Browse all VP0 topics →
Keep reading
Onboarding A/B Testing UI in React Native
Mostly an instrumentation task: sticky variant assignment, new-installs-only, and measuring activation not completion, so a bad test does not ship a worse app.
Podcast Snippet Clipper UI in React Native
Every shared clip is a fan-made trailer: a waveform selector, a render pipeline that burns in captions for muted feeds, and attribution on every clip.
React Native Deep Linking for Affiliate Marketing
Attribution engineering, not just navigation: Universal Links, deferred deep links across the install gap, and privacy-bound attribution that credits affiliates.
Build a Responsive iPhone-to-iPad Layout in React Native
A responsive tablet layout changes shape, it does not just scale up. Here is how to build an adaptive iPhone-to-iPad layout in React Native with breakpoints.
Build a High-Performance Candlestick Chart in React Native
A candlestick chart with thousands of candles and smooth pan-zoom needs Skia, not SVG. Here is how to build a high-performance candlestick chart in React Native.
Build an NS Flex Travel History Timeline in React Native
A travel history timeline lists past journeys by date. Here is how to build the NS Flex trip-history screen in React Native with fast scrolling and offline cache.