Skip to content

Slotted Layout ​

<pa-slotted-layout> | PaSlottedLayout

A flexible layout system for creating page-level layouts with header, main content, and optional side panels. Perfect for dashboards, forms, and content management interfaces with consistent navigation and responsive design.

vue
<pa-slotted-layout header-type="gradient" header-text="My Application">
  <div>Main content area</div>
</pa-slotted-layout>

Dev

Check issue with layout overflowing, see form layout.

Examples ​

Basic Layout ​

My Application
Main content area
vue
<template>
  <pa-slotted-layout 
    header-type="gradient" 
    header-text="My Application"
  >
    <div>Your main content goes here</div>
  </pa-slotted-layout>
</template>
Dashboard
Dashboard content with branded header
vue
<template>
  <pa-slotted-layout 
    header-type="duotone" 
    header-text="Dashboard"
    logo="chart-line"
  >
    <div>Dashboard content</div>
  </pa-slotted-layout>
</template>

Form Layout ​

User Portal

Sign In

vue
<template>
  <pa-slotted-layout header-type="gradient" header-text="User Portal">
    <pa-slotted-layout-form
      hero-header="Sign In"
      hero-subheader="Access your account"
      action-btn-label="Login"
      @submit="handleLogin"
    >
      <pa-input v-model="email" placeholder="Email" />
      <pa-input v-model="password" type="password" placeholder="Password" />
    </pa-slotted-layout-form>
  </pa-slotted-layout>
</template>

<script setup>
import { ref } from 'vue'

const email = ref('')
const password = ref('')

const handleLogin = () => {
  // Handle form submission
}
</script>

Importing ​

js
import { PaSlottedLayout, PaSlottedLayoutForm } from '@payadvantage/ui-components'

Slots ​

PaSlottedLayout ​

Slot NameDescription
defaultMain content area for the layout.
Named slotsDynamic slots for right-hand panels controlled by v-model.

PaSlottedLayoutForm ​

Slot NameDescription
defaultForm content area between hero section and action button.

Properties ​

PaSlottedLayout ​

PropertyTypeDefaultDescription
headerTypeString'gradient'Visual style of the header: 'gradient' or 'duotone'
modelValueString''Controls which right-hand slot is visible (used with v-model)
logoString''Icon name for the header logo
hideLogoBoxBooleanfalseWhether to hide the logo background box
logoUrlString''URL for a custom logo image (alternative to icon)
headerTextString''Text displayed in the header alongside the logo

PaSlottedLayoutForm ​

PropertyTypeDefaultDescription
heroIconString''Icon name for the hero section
heroIconVariantString'dark'Visual variant for the hero icon
heroHeaderString''Main header text for the form
mobileHeroHeaderString''Mobile-specific header text
heroSubheaderString''Subheader text below the main header
actionBtnLabelString'Continue'Label for the primary action button
hideActionBtnBooleanfalseWhether to hide the action button
sfSelectorActionBtnString''Custom selector for testing the action button

Events ​

PaSlottedLayout ​

EventParametersDescription
update:modelValueslotName: stringEmitted when the right-hand slot visibility changes

PaSlottedLayoutForm ​

EventParametersDescription
submitNoneEmitted when the action button is clicked
closeNoneEmitted when the close button is clicked

Methods ​

PaSlottedLayout ​

MethodParametersDescription
showSlot2(slotName)slotName: string⚠️ Deprecated: Programmatically show a right-hand slot
hideSlot2()None⚠️ Deprecated: Hide the right-hand slot

Note: Use v-model instead of the deprecated methods for controlling slot visibility.

Dependencies ​

  • Vue 3: Requires Vue 3 composition API and reactivity
  • PaSlottedLayoutHeader: Internal header component with logo and navigation
  • PaButton: Used for form action buttons and navigation controls
  • PaIcon: Used for logos and hero icons
  • PaHero components: PaHeroIcon, PaHeroHeader, PaHeroSubheader for form layouts

Usage Notes ​

Right-Hand Panels ​

Control side panels with v-model:

vue
<template>
  <pa-slotted-layout v-model="activePanel">
    <div>Main content</div>
    
    <template #settings>Settings panel</template>
    <template #help>Help panel</template>
  </pa-slotted-layout>
  
  <pa-button @click="activePanel = 'settings'">Settings</pa-button>
</template>

<script setup>
import { ref } from 'vue'
const activePanel = ref('')
</script>

Architecture ​

  • PaSlottedLayout: Main wrapper with header and content
  • PaSlottedLayoutForm: Specialized form layouts with hero sections
  • Header Types: gradient (default) or duotone styling
  • Responsive: Automatic mobile/desktop adaptation