Meda Next AppShell
meda/meda-next-app-shellFreeBlock
Install a copyable Next.js App Router shell adapter with link, menu, banner, full-bleed main, and command-palette wiring.
Live preview
live · rendered by the registry
Rendered by @meda on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://meda.medalsocial.com/r/meda-next-app-shell.jsonSource
1'use client'23import Link from 'next/link'4import type { ComponentProps, ReactNode } from 'react'5import {6 AppShell,7 AuthError,8 AuthNotice,9 AuthOneTapSlot,10 AuthProviderButton,11 AuthProviderList,12 MedaShellProvider,13 PanelViewsProvider,14 type AppDefinition,15 type AppShellAppTabsConfig,16 type IconRailItem,17 type PanelView,18 type ShellMainLayout,19 type WorkspaceDefinition,20 type WorkspaceMenuItem,21} from '@medalsocial/meda/shell'2223export function MedaNextWorkspaceShell({24 workspace,25 apps,26 iconItems,27 activeIconId,28 panelViews = [],29 defaultPanelView,30 appTabs,31 headerCenter,32 banners,33 mainLayout,34 mainClassName,35 workspaceMenuItems,36 workspaceMenuFooter,37 children,38}: {39 workspace: WorkspaceDefinition40 apps: AppDefinition[]41 iconItems: IconRailItem[]42 activeIconId?: string43 panelViews?: PanelView[]44 defaultPanelView?: string45 appTabs?: AppShellAppTabsConfig46 headerCenter?: ReactNode47 banners?: ReactNode48 mainLayout?: ShellMainLayout49 mainClassName?: string50 workspaceMenuItems?: WorkspaceMenuItem[]51 workspaceMenuFooter?: ReactNode52 children: ReactNode53}) {54 return (55 <MedaShellProvider workspace={workspace} apps={apps}>56 <AppShell57 variant="workspace"58 iconRail={{59 mainItems: iconItems,60 activeId: activeIconId,61 renderLink: ({ item, linkProps }) => (62 <Link {...linkProps} href={item.to} prefetch />63 ),64 }}65 appTabs={66 appTabs ?? {67 renderLink: ({ app, linkProps }) =>68 app.to ? <Link {...linkProps} href={app.to} prefetch /> : <a {...linkProps} />,69 }70 }71 headerCenter={headerCenter}72 banners={banners}73 mainLayout={mainLayout}74 mainClassName={mainClassName}75 workspace={{ menuItems: workspaceMenuItems, menuFooter: workspaceMenuFooter }}76 rightPanel={{ panelViews, defaultView: defaultPanelView }}77 >78 <PanelViewsProvider views={panelViews} defaultView={defaultPanelView}>79 {children}80 </PanelViewsProvider>81 </AppShell>82 </MedaShellProvider>83 )84}8586export function MedaNextAuthShell({87 brandName,88 brandMark,89 appName,90 tagline,91 preview,92 error,93 notice,94 onGoogleSignIn,95}: {96 brandName: ReactNode97 brandMark?: ReactNode98 appName?: ReactNode99 tagline?: ReactNode100 preview?: ReactNode101 error?: ReactNode102 notice?: ReactNode103 onGoogleSignIn: ComponentProps<typeof AuthProviderButton>['onClick']104}) {105// … truncated
What it pulls in
npm packages
Files it writes
More from @meda
All 12 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Meda Marketingmeda-marketing | @meda | Blocks | Free | 1 dep | |
| Meda Shellmeda-shell | @meda | Blocks | Free | 1 dep |
