Skip to content

Dialog Header

@astryxdesign/core v0.7.1 · DialogHeader

Props ​

PropTypeDefaultDescription
titlestring—The dialog title. It receives default focus on open and names the dialog. Required.
subtitlestring—Secondary text under the title. An empty string with no subtitle slot renders nothing.
hasCloseButtonbooleanfalseShows the close button, which emits openChange(false) when clicked.
endContentEdgeCompensation'inline' | 'block' | 'all'all when a close button is shownWhich edges of the trailing slot are compensated. inline is the inline end, block is both block edges, all is both. Omitting it with no close button compensates nothing.
closeButtonLabelstringActive languageAccessible name of the close button. Defaults to Close in English and 关闭 in Chinese.
hasDividerbooleanfalseDraws a themed rule along the bottom edge. The rule uses --astryx-color-border.

Events ​

  • openChange(isOpen: boolean): fires with false when the close button is clicked.

Slots ​

  • title: inline content in place of the title string. The heading still names the dialog.
  • subtitle: inline content for the subtitle.
  • startContent: content before the title, such as a back button.
  • endContent: content before the close button.