The DashboardResizeHandle component is used by the DashboardSidebar and DashboardPanel components.
It is automatically displayed when the resizable prop is set, you don't have to add it manually.
resize-handle slotEven though this component is automatically displayed when the resizable prop is set, you can use the resize-handle slot of the DashboardSidebar and DashboardPanel components to customize the handle.
<template>
<PDashboardGroup>
<PDashboardSidebar resizable>
<template #resize-handle="{ onMouseDown, onTouchStart, onDoubleClick }">
<PDashboardResizeHandle
class="hover:after:bg---ui-border-accented after:w-px after:transition after:inset-y-0 after:right-0 after:absolute"
@mousedown="onMouseDown"
@touchstart="onTouchStart"
@dblclick="onDoubleClick"
/>
</template>
</PDashboardSidebar>
<slot />
</PDashboardGroup>
</template>
<script setup lang="ts">
definePageMeta({
layout: 'dashboard'
});
</script>
<template>
<PDashboardPanel resizable>
<template #resize-handle="{ onMouseDown, onTouchStart, onDoubleClick }">
<PDashboardResizeHandle
class="hover:after:bg---ui-border-accented after:w-px after:transition after:inset-y-0 after:right-0 after:absolute"
@mousedown="onMouseDown"
@touchstart="onTouchStart"
@dblclick="onDoubleClick"
/>
</template>
</PDashboardPanel>
</template>
after pseudo-element to display a vertical line on hover.| Prop | Default | Type |
|---|
| Slot | Type |
|---|
Below is the theme configuration skeleton for the PDashboardResizeHandle. Since the component is provided unstyled by default, you will need to fill in these values to apply your own custom look and feel. If you prefer to use our pre-built, opinionated styling, you can instead use our UnoCSS preset, this docs is using it as well.
export default defineAppConfig({
pohon: {
dashboardResizeHandle: {
base: ''
}
}
};
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import pohon from 'pohon-ui/vite'
export default defineAppConfig({
pohon: {
dashboardResizeHandle: {
base: ''
}
}
};