ShareEventModal - Meeting credentials and invitation sharing interface

ShareEventModal is a React Native component that displays meeting credentials (room name, meeting ID, passcode) with social sharing buttons. It allows hosts to share meeting access information via copy link, QR code, email, and other methods.

Key Features:

  • Meeting ID display with copy functionality
  • Passcode display (admin passcode shown only to hosts)
  • Social share buttons (copy link, QR code, email, etc.)
  • Event type-specific formatting
  • Local/custom link support
  • Position-configurable modal (5 positions)
  • Scrollable content for long credentials

UI Customization: This component can be replaced via uiOverrides.shareEventModal to provide a completely custom sharing interface.

// Basic usage for host sharing
import React, { useState } from 'react';
import { ShareEventModal } from 'mediasfu-reactnative-expo';

const [showShare, setShowShare] = useState(false);

return (
<ShareEventModal
isShareEventModalVisible={showShare}
onShareEventClose={() => setShowShare(false)}
roomName="meeting-room-123"
adminPasscode="host-pass-456"
islevel="2" // Host - shows admin passcode
eventType="conference"
shareButtons={true}
/>
);
// Participant view without admin passcode
return (
<ShareEventModal
isShareEventModalVisible={isVisible}
onShareEventClose={handleClose}
roomName="webinar-room-789"
islevel="0" // Participant - no admin passcode shown
eventType="webinar"
position="center"
backgroundColor="rgba(255, 255, 255, 0.9)"
/>
);
// With custom local link
return (
<ShareEventModal
isShareEventModalVisible={showModal}
onShareEventClose={closeModal}
roomName={roomId}
adminPasscode={hostPass}
islevel={userLevel}
eventType="broadcast"
localLink="https://custom-domain.com/join"
shareButtons={true}
position="bottomRight"
/>
);
// Using custom UI via uiOverrides
const config = {
uiOverrides: {
shareEventModal: {
component: MyCustomShareModal,
injectedProps: {
theme: 'dark',
showQRCode: true,
},
},
},
};

return <MyMeetingComponent config={config} />;

Properties

propTypes?: WeakValidationMap<ShareEventModalOptions>

Used to declare the types of the props accepted by the component. These types will be checked during rendering and in development only.

We recommend using TypeScript instead of checking prop types at runtime.

contextTypes?: ValidationMap<any>

Lets you specify which legacy context is consumed by this component.

defaultProps?: Partial<ShareEventModalOptions>

Used to define default values for the props accepted by the component.

type Props = { name?: string }

const MyComponent: FC<Props> = (props) => {
return <div>{props.name}</div>
}

MyComponent.defaultProps = {
name: 'John Doe'
}
displayName?: string

Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.


const MyComponent: FC = () => {
return <div>Hello!</div>
}

MyComponent.displayName = 'MyAwesomeComponent'