基础使用
+返回顶部
+
+## API
+
+| 参数 | 说明 | 类型 | 默认值 |
+| --------- | ------------------------ | --------------------------- | ------- |
+| className | 类名 | `string` | - |
+| style | 样式 | `CSSProperties` | - |
+| draggable | 拖拽配置 | `boolean \| DraggableProps` | `false` |
+| position | 位置 | `{x: number, y: number}` | 左上角 |
+| onChange | 拖拽结束后触发的回调函数 | `Function` | - |
+
+其中 `DraggableProps` 类型具体参考 [draggable-api](https://github.com/react-grid-layout/react-draggable?tab=readme-ov-file#draggable-api)。
diff --git a/src/float/index.scss b/src/float/index.scss
new file mode 100644
index 000000000..7a6fb058c
--- /dev/null
+++ b/src/float/index.scss
@@ -0,0 +1,8 @@
+.dtc-float-container {
+ position: fixed;
+ top: 0;
+ left: 0;
+ &__dragging {
+ pointer-events: none;
+ }
+}
diff --git a/src/float/index.tsx b/src/float/index.tsx
new file mode 100644
index 000000000..d6df6e039
--- /dev/null
+++ b/src/float/index.tsx
@@ -0,0 +1,58 @@
+import React, { useState } from 'react';
+import Draggable, { type DraggableEventHandler, type DraggableProps } from 'react-draggable';
+import classNames from 'classnames';
+
+import useMergeOption, { type MergeOption } from '../useMergeOption';
+import './index.scss';
+
+export interface IFloatProps {
+ className?: string;
+ style?: React.CSSProperties;
+ draggable?: MergeOption