Type Alias NavbarCustomButton

NavbarCustomButton: {
    className?: string;
    collapsable?: boolean;
    content: string | NavbarButtonElement;
    disabled?: boolean;
    id?: string;
    onClick?: (viewer: Viewer) => void;
    tabbable?: boolean;
    title?: string;
    visible?: boolean;
}

Definition of a custom navbar button

Type declaration

  • OptionalclassName?: string

    CSS class added to the button

  • Optionalcollapsable?: boolean

    if the button can be moved to menu when the navbar is too small

    true
    
  • content: string | NavbarButtonElement

    Content of the button. Preferably a square image or SVG icon

  • Optionaldisabled?: boolean

    initial state of the button

    false
    
  • Optionalid?: string

    Unique identifier of the button, usefull when using the Navbar.getButton method

  • OptionalonClick?: (viewer: Viewer) => void

    Function called when the button is clicked

  • Optionaltabbable?: boolean

    if the button is accessible with the keyboard

    true
    
  • Optionaltitle?: string

    Tooltip displayed when the mouse is over the button If can be a key in the global lang config

  • Optionalvisible?: boolean

    initial visibility of the button

    true