The CWA is in heavy development
The CWA is still in alpha and not ready for production - some code and implementations are likely to change. If you would like to try out the CWA, please enjoy what we have provided and feel free to provide feedback, or get involved on GitHub.
Cwa Components

<CwaDefaultLayout />

A minimal flex-column layout shell used as a fallback when no layout component is resolved.

<CwaDefaultLayout> is the fallback layout CWA uses when the current page has no Layout resource, or its Layout resource has no uiComponent value.

You will rarely use this directly. It exists so that CWA can always render something — even for pages that haven't been fully configured in the CMS yet.

CWA does not fall back here when uiComponent holds a name that doesn't resolve. The value is handed to <component :is> as-is, Vue fails to resolve it, and nothing renders. (A warning/fallback for this case is an open todo in the module.)

Structure

It renders a minimal full-height flex column:

<div id="cwa:default-layout" class="cwa:flex cwa:flex-col cwa:h-full">
  <slot />
</div>

CWA's own utility classes are namespaced with the cwa: prefix so they never collide with your Tailwind build. The default <slot /> is where <CwaPage /> renders the current page template.

When It Appears

  • A new CWA project before any layouts have been created in the admin
  • A page whose Layout record has an empty uiComponent
  • During development when you're building a layout component but haven't connected it in the CMS yet

Replacing It

Create the layout file in app/cwa/layouts/ — that's what makes the component resolvable. Once the CMS has a Layout record whose uiComponent is the registered component name (CwaLayoutPrimary for Primary.vue), <CwaDefaultLayout> is no longer used for that page.

<!-- app/cwa/layouts/Primary.vue -->
<template>
  <div class="min-h-screen">
    <AppHeader />
    <slot />
    <AppFooter />
  </div>
</template>

Registering the layout in nuxt.config.ts → cwa.layouts is optional — it only adds a display name and style options in the admin.

// nuxt.config.ts
cwa: {
    layouts: {
        Primary: { name: 'Primary Layout' }
    }
}