Skip to content

Accessibility: Not Needed

Translations: Not Needed

Content Wrap

The Content Wrap component is a foundational layout component that provides consistent styling, and notification support across the application. It serves as a wrapper for its child components.

Basic Usage

This content is wrapped in the default ContentWrap component
html
<template>
  <HLContentWrap>
    <div class="p-4 border rounded">This content is wrapped in the default ContentWrap component</div>
  </HLContentWrap>
</template>
<script setup>
  import { HLContentWrap } from '@platform-ui/highrise'
</script>

Full Screen Mode

This content occupies the entire screen with no padding applied
html
<template>
  <HLContentWrap :fullScreen="true">
    <div class="border rounded">This content occupies the full screen with no padding applied</div>
  </HLContentWrap>
</template>
<script setup>
  import { HLContentWrap } from '@platform-ui/highrise'
</script>

Notification Configuration

The ContentWrap component includes a notification system that can be customized through the notificationConfig prop:

html
<template>
  <HLContentWrap
    :notificationConfig="{
    containerClass: 'custom-notification',
    containerStyle: { top: '24px' },
    placement: 'top-right',
    max: 5,
    scrollable: true
  }"
  >
    <!-- Content with custom notification settings -->
  </HLContentWrap>
</template>
<script setup>
  import { HLContentWrap } from '@platform-ui/highrise'
</script>

Imports

ts
import { HLContentWrap } from '@platform-ui/highrise'

Props

NameTypeDefaultDescription
fullScreenbooleanfalseWhen true, removes the default padding (32px) from the container
localestring'en-US'Sets the language for localization. See supported languages above
notificationConfigobject{}Configuration object for the notification system
namespacestring'platform-ui__highrise'Class name of the container of detached parts of components inside HLContentWrap

NOTE

namespace MUST be used when using CSS style overrides that are not scoped and must include the app name passed to the tailwind-prefix-wrapper plugin. ref

Example:

scss
/* Correct - using namespace */
.paymentLinksApp {
  .custom-button {
    color: red;
  }
  // ... other global / unscoped styles
}

/* Incorrect - global styles */
.custom-button {
  color: red;
}

NotificationConfig Properties

NameTypeDescription
containerClassstringCustom class for the notification container
containerStyleobjectCustom styles for the notification container
tostringTarget element to mount notifications
placementstringPosition of notifications ('top-right', 'top', etc.)
maxnumberMaximum number of notifications to show
scrollablebooleanWhether notifications should be scrollable

Slots

NameDescription
defaultThe content to be wrapped by the component

Best Practices

  1. Always wrap your main application content with HLContentWrap to ensure consistent theming across all HighRise components.
  2. Use HLContentWrap as the wrapper when integrating GHL-UI components with HighRise components.
  3. Enable fullScreen mode when creating custom layouts that require removing the default padding.
  4. Customize the notification system according to your application's requirements using the notificationConfig prop.