ChatiumFor developersPlaygroundPricing
Sign in

FloatingWindow

Properties

  • title (string):
    The title of the window displayed in the header. If provided, it will be shown inside an element with the class FloatingWindow__header__title.
  • header (any):
    Additional content for the header. It can be any JSX element or a set of elements that will be displayed in the window's header.
  • shown (boolean):
    Determines whether the window is displayed. If true, a modifier __shown will be added to the class, which controls the visibility of the window.
  • side ('left' | 'right'):
    Determines the side from which the window will be displayed. By default, the window appears on the left ('left'), but it can also appear on the right ('right').
  • top (number | string):
    The position of the window from the top. It can be provided in pixels (number) or as a string with CSS units (string).
  • style (jsx.JSX.CSSProperties):
    Inline styles for the main container of the window. Allows customization of appearance through CSS properties.
  • onClose *(function(MouseEvent)):
    Click handler for the close button of the window. If provided, a "✕" button will appear, and clicking it will invoke the passed function.

Important Points

  • propsTitle and propsHeader:
    Computed values for the title and header of the window. If a title or custom header is provided, they will be displayed in the window's header.
  • classes:
    Forms a string of classes for the window. Adds the base class FloatingWindow, side modifiers (__left or __right), and the window's display state (__shown).
  • styles:
    A computed object of inline styles that includes top margin (top), if provided, and any other custom styles from props.style.