Floating Bar

在录制就绪、进行中或处理中时悬浮于所有应用之上的胶囊条,带有关闭按钮。

可用框架
  • Angular: 可用
  • Vue: 可用
  • React: 可用
  • React Native: 暂不可用

用法

Ready · ⌘⇧R

导入

ts
import {
  SoneFloatingBarComponent,
} from "@surface-one/angular/floating-bar";

API 参考

SoneFloatingBarComponent组件

选择器
sone-floating-bar
输入
名称类型 默认值
stateFloatingBarState"idle"
closeLabel—$localize`:Button that hides the floating recording bar:Hide`
closable

Show the trailing close button.

booleantrue
dragRegionAttr

An attribute that marks the bar's chrome as the window's drag handle — Tauri's `data-tauri-drag-region`. Set on the bar's own background element, so projected content needs none of its own. `null` = no attribute.

string | nullnull
dragRegionValue

The attribute's value. `deep` (default): Tauri 2.11 drags from anywhere inside the bar except buttons, links, inputs and labels; `""`: the background only.

string"deep"
输出
名称类型
closedvoid