Loading...
Loading...
Add user invitation dialogs to your Next.js app
npx skill4agent add iblai/vibe iblai-inviteAI Assistant: Do NOT add custom styles, colors, or CSS overrides to ibl.ai SDK components. They ship with their own styling. Keep the components as-is. Do NOT implement dark mode unless the user explicitly asks for it.When building custom UI around SDK components, use the ibl.ai brand:
- Primary:
, Gradient:#0058cclinear-gradient(135deg, #00b0ef, #0058cc)- Button:
bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white- Font: System sans-serif stack, Style: shadcn/ui new-york variant
- Use shadcn components for custom UI -- they share the same Tailwind theme and render in ibl.ai brand colors automatically.
You MUST runbefore telling the user the work is ready./iblai-testAfter all work is complete, start a dev server () so the user can see the result at http://localhost:3000.pnpm devis NOT aiblai.envreplacement — it only holds the 3 shorthand variables (.env.local,DOMAIN,PLATFORM). Next.js still reads its runtime env vars fromTOKEN..env.localUseas the default package manager. Fall back topnpmif pnpm is not installed. The generated app should live in the current directory, not in a subdirectory.npm
/iblai-authiblai add mcpiblaiiblai --versionpip install --upgrade iblai-app-clinpm install -g @iblai/cli@latestiblai.envPLATFORMDOMAINTOKENiblai.envcurl -o iblai.env https://raw.githubusercontent.com/iblai/vibe/refs/heads/main/iblai.envimport { InviteUserDialog, InvitedUsersDialog } from "@iblai/iblai-js/web-containers";get_component_info("InviteUserDialog")
get_component_info("InvitedUsersDialog")<InviteUserDialog>| Prop | Type | Description |
|---|---|---|
| | Whether the dialog is visible |
| | Close callback |
| | Tenant/org key |
<InvitedUsersDialog>| Prop | Type | Description |
|---|---|---|
| | Whether the dialog is visible |
| | Close callback |
| | Tenant/org key |
"use client";
import { useState } from "react";
import { InviteUserDialog, InvitedUsersDialog } from "@iblai/iblai-js/web-containers";
import { Button } from "@/components/ui/button";
import { resolveAppTenant } from "@/lib/iblai/tenant";
export function InviteSection() {
const [showInvite, setShowInvite] = useState(false);
const [showPending, setShowPending] = useState(false);
const tenant = resolveAppTenant();
return (
<div className="flex gap-2">
<Button onClick={() => setShowInvite(true)}>Invite User</Button>
<Button variant="outline" onClick={() => setShowPending(true)}>
View Pending
</Button>
<InviteUserDialog
isOpen={showInvite}
onClose={() => setShowInvite(false)}
org={tenant}
/>
<InvitedUsersDialog
isOpen={showPending}
onClose={() => setShowPending(false)}
org={tenant}
/>
</div>
);
}/iblai-testpnpm buildpnpm dev &
npx playwright screenshot http://localhost:3000 /tmp/invite.png@iblai/iblai-js/web-containersmentorReducermentorMiddlewareinitializeDataLayer()@reduxjs/toolkitnext.config.ts