
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@botanicastudios/preview-app-bridge-remix
Advanced tools
A comprehensive React package for Shopify App Bridge preview functionality. This package provides mock implementations and preview components that allow developers to build and test Shopify apps without requiring a full Shopify environment.
A comprehensive React package for Shopify App Bridge preview functionality. This package provides mock implementations and preview components that allow developers to build and test Shopify apps without requiring a full Shopify environment.
This package is designed to be used as a local module within your Shopify app project.
import React from 'react';
import { AppBridgeProvider } from 'preview-app-bridge-react';
function App() {
return (
<AppBridgeProvider>
{/* Your app components */}
</AppBridgeProvider>
);
}
import React from 'react';
import { useAppBridge } from 'preview-app-bridge-react';
import { Button } from '@shopify/polaris';
function MyComponent() {
const shopify = useAppBridge();
const handleSelectProducts = async () => {
try {
const products = await shopify.resourcePicker({
type: 'product',
multiple: true,
});
shopify.toast.show(`Selected ${products.length} products`);
} catch (error) {
shopify.toast.error('Failed to select products');
}
};
return (
<Button onClick={handleSelectProducts}>
Select Products
</Button>
);
}
import React, { useState } from 'react';
import { Modal, TitleBar } from 'preview-app-bridge-react';
function MyPage() {
const [modalOpen, setModalOpen] = useState(false);
return (
<>
<TitleBar
title="My Page"
primaryAction={{
content: 'Open Modal',
onAction: () => setModalOpen(true),
}}
/>
<Modal
open={modalOpen}
onClose={() => setModalOpen(false)}
title="Example Modal"
primaryAction={{
content: 'Save',
onAction: () => {
// Handle save
setModalOpen(false);
},
}}
>
<p>Modal content goes here</p>
</Modal>
</>
);
}
The package includes auto-initialization functionality that can be enabled in preview mode:
import { initializePreviewAppBridge } from 'preview-app-bridge-react';
// Initialize preview mode (typically in your app's entry point)
if (process.env.NODE_ENV === 'development') {
initializePreviewAppBridge();
}
preview-app-bridge-react/
βββ index.ts # Main package exports
βββ package.json # Package configuration
βββ components/ # React components
β βββ Modal.tsx
β βββ TitleBar.tsx
β βββ NavMenu.tsx
β βββ ...
βββ hooks/ # React hooks
β βββ useAppBridge.tsx
β βββ index.ts
βββ context/ # React context
β βββ AppBridgeContext.tsx
β βββ index.ts
βββ apis/ # Mock APIs
β βββ toast.ts
β βββ loading.ts
β βββ resource-picker.ts
β βββ ...
βββ services/ # Utility services
β βββ token-generator.ts
β βββ request-interceptor.ts
β βββ ...
βββ types/ # TypeScript type definitions
β βββ index.ts
βββ server/ # Server-side utilities
β βββ jwt-signer.ts
βββ auto-init.ts # Auto-initialization
βββ examples.ts # Usage examples
βββ comprehensive-usage-example.tsx
This package is built with TypeScript and provides comprehensive type definitions for all components, hooks, and APIs.
MIT
FAQs
A comprehensive React package for Shopify App Bridge preview functionality. This package provides mock implementations and preview components that allow developers to build and test Shopify apps without requiring a full Shopify environment.
We found that @botanicastudios/preview-app-bridge-remix demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.