Components
AppShell provides three key components for rendering micro-frontend applications:
AppRenderer - Renders fullpage applications
PluginRenderer - Renders plugin applications in designated placeholders
ModalRenderer - Renders applications in modal dialogs
AppRenderer
Renders fullpage micro-frontends managed by the AppShell. It dynamically inserts the application's iframe into the DOM based on the provided application ID.
Usage
import { AppRenderer } from '@akinon/app-shell';
const FullPageAppContainer = () => {
return (
<div className="fullpage-container">
<AppRenderer id={1} />
</div>
);
};Props
id
number
Yes
Unique identifier for the application iframe, application PK may be used
path
string
No
Path to append to the iframe src URL
With Custom Path
How It Works
Retrieve Iframe - Accesses AppShell context to get the iframe reference for the given ID
Insert Iframe - Dynamically inserts the iframe into the container
Style Adjustment - Ensures iframe occupies full container space
PluginRenderer
Renders plugin-type micro-frontends in specific placeholders. Plugins are designed to be embedded within parts of the application without taking over the entire page.
Usage
Props
placeholderId
string
Yes
ID of the placeholder where the plugin should render
params
ApplicationParams
No
Additional parameters to pass to the plugin
ApplicationParams Type
With Parameters
How It Works
Identify Plugin - Uses
placeholderIdto find the matching plugin from AppShell contextMatch Configuration - Finds the app whose
config.placeholdermatches theplaceholderIdEmbed Iframe - Inserts the iframe into the placeholder container
Placeholder Configuration
When registering apps, plugins must specify their placeholder:
ModalRenderer
Renders fullpage application content within a modal dialog. Used for rich modals that need to display micro-frontend content.
How It Works
Client triggers modal - Client calls
actions.showRichModal(path, context, size, closeIconColor)Shell generates UUID - Shell creates a unique identifier with
crypto.randomUUID()Shell calls your handler - Your
showRichModalfunction receives(uuid, path, context, size, closeIconColor)Render ModalRenderer - Use the received uuid and path in
ModalRenderer
Usage
Props
uuid
UUID
Yes
Unique identifier generated by shell and passed to your showRichModal handler
path
string
Yes
Path to render content within the modal (relative to client's web_url)
size
ApplicationModalSize
No
Size configuration for the modal (defaults to 540x360px)
The context parameter is sent to the client via SET_MODAL_CONTEXT event and accessible through useAppClient().modalContext. The closeIconColor is for styling the shell's modal close button.
ApplicationModalSize Type
With Size Configuration
Complete Example
Here's how all three components work together in a shell application:
Styling Considerations
All renderer components insert iframes that fill their container. Ensure the container has appropriate dimensions:
Related
Hooks - useAppShell hook
Configuration - App registration
API Reference - Complete type definitions
Last updated
Was this helpful?

