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
Name | Type | Default | Description |
---|---|---|---|
fullScreen | boolean | false | When true, removes the default padding (32px) from the container |
locale | string | 'en-US' | Sets the language for localization. See supported languages above |
notificationConfig | object | {} | Configuration object for the notification system |
namespace | string | '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
Name | Type | Description |
---|---|---|
containerClass | string | Custom class for the notification container |
containerStyle | object | Custom styles for the notification container |
to | string | Target element to mount notifications |
placement | string | Position of notifications ('top-right', 'top', etc.) |
max | number | Maximum number of notifications to show |
scrollable | boolean | Whether notifications should be scrollable |
Slots
Name | Description |
---|---|
default | The content to be wrapped by the component |
Best Practices
- Always wrap your main application content with
HLContentWrap
to ensure consistent theming across all HighRise components. - Use
HLContentWrap
as the wrapper when integrating GHL-UI components with HighRise components. - Enable fullScreen mode when creating custom layouts that require removing the default padding.
- Customize the notification system according to your application's requirements using the notificationConfig prop.