---
title: "DashboardResizeHandle"
description: "Ручка изменения размера для боковых меню и панелей."
canonical_url: "https://b24-ui.bx-shef.by/docs/components/dashboard-resize-handle"
---
# DashboardResizeHandle

> Ручка изменения размера для боковых меню и панелей.

## Использование

Компонент DashboardResizeHandle используют [DashboardSidebar](https://b24-ui.bx-shef.by/raw/docs/components/dashboard-sidebar.md) и [DashboardPanel](https://b24-ui.bx-shef.by/raw/docs/components/dashboard-panel.md).

Он показывается автоматически, если задан пропс `resizable`, **добавлять его вручную не нужно**.

## Примеры

### В слоте `resize-handle`

Хотя компонент показывается автоматически при пропсе `resizable`, слот `resize-handle` компонентов [DashboardSidebar](https://b24-ui.bx-shef.by/raw/docs/components/dashboard-sidebar.md) и [DashboardPanel](https://b24-ui.bx-shef.by/raw/docs/components/dashboard-panel.md) позволяет настроить ручку.

```vue [layouts/dashboard.vue]
<template>
  <B24DashboardGroup>
    <B24DashboardSidebar resizable>
      <template #resize-handle="{ onMouseDown, onTouchStart, onDoubleClick }">
        <B24DashboardResizeHandle
          class="after:absolute after:inset-y-0 after:right-0 after:w-px hover:after:bg-(--ui-color-accent-soft-element-blue) after:transition"
          @mousedown="onMouseDown"
          @touchstart="onTouchStart"
          @dblclick="onDoubleClick"
        />
      </template>
    </B24DashboardSidebar>

    <slot />
  </B24DashboardGroup>
</template>
```

```vue [pages/index.vue]
<script setup lang="ts">
definePageMeta({
  layout: 'dashboard'
})
</script>

<template>
  <B24DashboardPanel resizable>
    <template #resize-handle="{ onMouseDown, onTouchStart, onDoubleClick }">
      <B24DashboardResizeHandle
        class="after:absolute after:inset-y-0 after:right-0 after:w-px hover:after:bg-(--ui-color-accent-soft-element-blue) after:transition"
        @mousedown="onMouseDown"
        @touchstart="onTouchStart"
        @dblclick="onDoubleClick"
      />
    </template>
  </B24DashboardPanel>
</template>
```

> [!NOTE]
> В этом примере псевдоэлемент `after` рисует вертикальную линию при наведении.

## API

### Пропсы

```ts
/**
 * Props for the DashboardResizeHandle component
 */
interface DashboardResizeHandleProps {
  /**
   * The element or component this component should render as.
   * @default 'div'
   */
  as?: any;
  b24ui?: { base?: any; } | undefined;
}
```

### Слоты

```ts
/**
 * Slots for the DashboardResizeHandle component
 */
interface DashboardResizeHandleSlots {
  default(): any;
}
```

## Тема

```ts [app.config.ts]
export default defineAppConfig({
  b24ui: {
    dashboardResizeHandle: {
      base: 'hidden lg:block touch-none select-none cursor-ew-resize relative before:absolute before:inset-y-0 before:-left-1.5 before:-right-1.5 before:z-1'
    }
  }
})
```

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
