Skip to main content

Title Bar & Fullscreen

Control the admin page title bar and fullscreen mode from your embedded app.

Title Bar

useTitleBar()

Update the title bar displayed at the top of your app in the Qumra Admin:

import { useTitleBar } from "@qumra/jisr";
import { useEffect } from "react";

function ProductPage({ product }) {
const titleBar = useTitleBar();

useEffect(() => {
titleBar.update({
title: product.name,
breadcrumbs: [
{ label: "Products", url: "/products" },
{ label: product.name },
],
});
}, [product]);

return <div>{/* Product content */}</div>;
}

TitleBarOptions

PropertyTypeDescription
titlestringThe page title to display.
breadcrumbsBreadcrumb[]Optional breadcrumb navigation trail.
primaryActionActionOptionOptional primary action button in the title bar.
secondaryActionsActionOption[]Optional secondary action buttons.
PropertyTypeDescription
labelstringDisplay text for the breadcrumb.
urlstringOptional URL to navigate to when clicked.

Title Bar with Actions

titleBar.update({
title: "Product Details",
primaryAction: {
label: "Save",
onAction: handleSave,
},
secondaryActions: [
{
label: "Delete",
onAction: handleDelete,
destructive: true,
},
],
});

Fullscreen

useFullscreen()

Toggle fullscreen mode for your app within the Qumra Admin:

import { useFullscreen } from "@qumra/jisr";

function EditorPage() {
const fullscreen = useFullscreen();

return (
<div>
<button onClick={() => fullscreen.enter()}>
Enter Fullscreen
</button>
<button onClick={() => fullscreen.exit()}>
Exit Fullscreen
</button>
</div>
);
}

Methods

MethodDescription
fullscreen.enter()Enter fullscreen mode. Hides the admin sidebar and header.
fullscreen.exit()Exit fullscreen mode. Restores the admin sidebar and header.
tip

Fullscreen mode is useful for editors, builders, or any page that needs maximum screen real estate. Remember to provide a clear way for users to exit fullscreen.