Mixins / foldkit-mixins-ui

FloatingPanelView

interface · packages/mixins-ui/src/floatingPanel.ts:456

interface FloatingPanelView<ParentMessage> {
  readonly model: Model
  readonly onMessage: (message: Message) => NoInfer<ParentMessage>
  readonly title: string
  readonly content: Html
  readonly order?: ReadonlyArray<string> | undefined
  readonly resizable?: boolean | undefined
  readonly draggable?: boolean | undefined
  readonly closeOnEscape?: boolean | undefined
  readonly controls?: ReadonlyArray<Control> | undefined
  readonly routes?: ReadonlyArray<Route<NoInfer<ParentMessage>>> | undefined
  readonly step?: number | undefined
  readonly direction?: 'ltr' | 'rtl' | undefined
  readonly words?: Partial<FloatingPanelWords> | undefined
  readonly style?: NamedStyle<typeof FloatingPanelSlots> | undefined
  readonly mixins?: MixinList<ParentMessage> | undefined
}

Members

FloatingPanelView.model

property · packages/mixins-ui/src/floatingPanel.ts:457

readonly model: Model

FloatingPanelView.onMessage

property · packages/mixins-ui/src/floatingPanel.ts:458

readonly onMessage: (message: Message) => NoInfer<ParentMessage>

FloatingPanelView.title

property · packages/mixins-ui/src/floatingPanel.ts:460

readonly title: string

The title, naming the panel and its header.

FloatingPanelView.content

property · packages/mixins-ui/src/floatingPanel.ts:461

readonly content: Html

FloatingPanelView.order

property · packages/mixins-ui/src/floatingPanel.ts:463

readonly order?: ReadonlyArray<string> | undefined

The ids of every panel on the page, from the bottom; the last is on top.

FloatingPanelView.resizable

property · packages/mixins-ui/src/floatingPanel.ts:465

readonly resizable?: boolean | undefined

Whether it can be resized; default true.

FloatingPanelView.draggable

property · packages/mixins-ui/src/floatingPanel.ts:467

readonly draggable?: boolean | undefined

Whether its header drags it; default true.

FloatingPanelView.closeOnEscape

property · packages/mixins-ui/src/floatingPanel.ts:469

readonly closeOnEscape?: boolean | undefined

Whether Escape closes it; default true.

FloatingPanelView.controls

property · packages/mixins-ui/src/floatingPanel.ts:476

readonly controls?: ReadonlyArray<Control> | undefined

The header's controls, default all three. Always drawn in the order minimize, maximize, restore, close; restore is drawn whenever the panel is minimized or maximized, so a panel that can only be maximized can still come back.

FloatingPanelView.routes

property · packages/mixins-ui/src/floatingPanel.ts:484

readonly routes?: ReadonlyArray<Route<NoInfer<ParentMessage>>> | undefined

Keys the application answers on the panel, beside Escape (unless closeOnEscape is false). They share one keydown owner with it: a route on the same gesture is a diagnostic naming both. The arrows on the drag trigger and the resizing corner are the panel's own, and a press they handled still reaches the panel, as nothing stops propagation.

FloatingPanelView.step

property · packages/mixins-ui/src/floatingPanel.ts:486

readonly step?: number | undefined

Pixels an arrow moves or resizes it by; five times that with Shift. Default 10.

FloatingPanelView.direction

property · packages/mixins-ui/src/floatingPanel.ts:488

readonly direction?: 'ltr' | 'rtl' | undefined

Default 'ltr'; under 'rtl' the corner the arrows resize from is the bottom left.

FloatingPanelView.words

property · packages/mixins-ui/src/floatingPanel.ts:490

readonly words?: Partial<FloatingPanelWords> | undefined

The controls' words, the header's and the corner's; defaults FloatingPanel.words.

FloatingPanelView.style

property · packages/mixins-ui/src/floatingPanel.ts:492

readonly style?: NamedStyle<typeof FloatingPanelSlots> | undefined

A style of FloatingPanelSlots, for the look.

FloatingPanelView.mixins

property · packages/mixins-ui/src/floatingPanel.ts:494

readonly mixins?: MixinList<ParentMessage> | undefined

Mixins beside the style: FloatingPanel.focusReturn.