interface.rst 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. .. _interface:
  2. The JupyterLab Interface
  3. ========================
  4. JupyterLab provides flexible building blocks for interactive,
  5. exploratory computing. While JupyterLab has many features found in
  6. traditional integrated development environments (IDEs), it remains
  7. focused on interactive, exploratory computing.
  8. The JupyterLab interface consists of a :ref:`main work area <main-area>`
  9. containing tabs of documents and activities, a collapsible :ref:`left sidebar
  10. <left-sidebar>`, and a :ref:`menu bar <menu-bar>`. The left sidebar contains a
  11. :ref:`file browser <working-with-files>`, the :ref:`list of running kernels and
  12. terminals <running>`, the :ref:`command palette <commands>`, the :ref:`notebook
  13. cell tools inspector <notebook>`, and the :ref:`tabs list <tabs>`.
  14. .. image:: images/interface_jupyterlab.png
  15. :align: center
  16. :class: jp-screenshot
  17. :alt: A screenshot of the JupyterLab interface. The main work area is in the middle section of the interface. There is also a left sidebar and a top menu bar.
  18. JupyterLab sessions always reside in a :ref:`workspace <url-workspaces-ui>`.
  19. Workspaces contain the state of JupyterLab: the files that are currently open,
  20. the layout of the application areas and tabs, etc.
  21. Workspaces can be saved on the server with
  22. :ref:`named workspace URLs <url-workspaces-ui>`.
  23. To learn more about URLs in Jupyterlab, visit :ref:`urls`.
  24. .. _menu-bar:
  25. Menu Bar
  26. --------
  27. The menu bar at the top of JupyterLab has top-level menus that expose
  28. actions available in JupyterLab with their keyboard shortcuts. The
  29. default menus are:
  30. - **File**: actions related to files and directories
  31. - **Edit**: actions related to editing documents and other activities
  32. - **View**: actions that alter the appearance of JupyterLab
  33. - **Run**: actions for running code in different activities such as
  34. notebooks and code consoles
  35. - **Kernel**: actions for managing kernels, which are separate processes
  36. for running code
  37. - **Tabs**: a list of the open documents and activities in the dock panel
  38. - **Settings**: common settings and an advanced settings editor
  39. - **Help**: a list of JupyterLab and kernel help links
  40. :ref:`JupyterLab extensions <user_extensions>` can also create new top-level menus in the menu
  41. bar.
  42. .. _left-sidebar:
  43. Left Sidebar
  44. ------------
  45. The left sidebar contains a number of commonly-used tabs, such as a file
  46. browser, a list of running kernels and terminals, the command palette,
  47. and a list of tabs in the main work area:
  48. .. image:: images/interface_left.png
  49. :align: center
  50. :class: jp-screenshot
  51. :alt: A screenshot of the primary JupyterLab sidebar showing a variety of files in the file browser.
  52. .. _left-sidebar-toggle:
  53. The left sidebar can be collapsed or expanded by selecting "Show Left Sidebar"
  54. in the View menu or by clicking on the active sidebar tab:
  55. .. raw:: html
  56. <div class="jp-youtube-video">
  57. <iframe src="https://www.youtube-nocookie.com/embed/PlJGecfetek?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  58. </div>
  59. JupyterLab extensions can add additional panels to the left sidebar.
  60. .. _main-area:
  61. Main Work Area
  62. --------------
  63. .. _main-area-vid:
  64. The main work area in JupyterLab enables you to arrange documents (notebooks,
  65. text files, etc.) and other activities (terminals, code consoles, etc.) into
  66. panels of tabs that can be resized or subdivided. Drag a tab to the center of a
  67. tab panel to move the tab to the panel. Subdivide a tab panel by dragging a tab to
  68. the left, right, top, or bottom of the panel:
  69. .. raw:: html
  70. <div class="jp-youtube-video">
  71. <iframe src="https://www.youtube-nocookie.com/embed/Ka8qS7CO1XQ?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  72. </div>
  73. The work area has a single current activity. The tab for the current activity is
  74. marked with a colored top border (blue by default).
  75. .. _tabs:
  76. Tabs and Simple Interface Mode
  77. ------------------------------
  78. The Tabs panel in the left sidebar lists the open documents or
  79. activities in the main work area:
  80. .. image:: images/interface_tabs.png
  81. :align: center
  82. :class: jp-screenshot
  83. :alt: A screenshot of the tabs panel in JupyterLab that lists some sample documents.
  84. The same information is also available in the Tabs menu:
  85. .. image:: images/interface_tabs_menu.png
  86. :align: center
  87. :class: jp-screenshot
  88. :alt: A screenshot of the tabs menu in JupyterLab with a list of sample documents.
  89. .. _tabs-singledocument:
  90. It is often useful to focus on a single document or activity without closing
  91. other tabs in the main work area. Simple Interface mode enables this, while making
  92. it easy to return to your multi-activity layout in the main work area.
  93. Toggle Simple Interface mode using the View menu:
  94. .. raw:: html
  95. <div class="jp-youtube-video">
  96. <iframe src="https://www.youtube-nocookie.com/embed/DO7NOenMQC0?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  97. </div>
  98. When you leave Simple Interface mode, the original layout of the main
  99. area is restored.
  100. Context Menus
  101. -------------
  102. .. _context-menus-rightclick:
  103. Many parts of JupyterLab, such as notebooks, text files, code consoles,
  104. and tabs, have context menus that can be accessed by right-clicking on
  105. the element:
  106. .. raw:: html
  107. <div class="jp-youtube-video">
  108. <iframe src="https://www.youtube-nocookie.com/embed/y30fs6kg6fc?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  109. </div>
  110. .. _context-menus-shiftrightclick:
  111. The browser’s native context menu can be accessed by holding down
  112. ``Shift`` and right-clicking:
  113. .. raw:: html
  114. <div class="jp-youtube-video">
  115. <iframe src="https://www.youtube-nocookie.com/embed/XPPWW-7WJ40?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  116. </div>
  117. .. _shortcuts:
  118. Keyboard Shortcuts
  119. ------------------
  120. .. _shortcuts-settings:
  121. As in the classic Notebook, you can navigate the user interface through keyboard
  122. shortcuts. You can find and customize the current list of keyboard shortcuts by
  123. selecting the Advanced Settings Editor item in the Settings menu, then selecting
  124. Keyboard Shortcuts in the Settings tab.
  125. .. raw:: html
  126. <div class="jp-youtube-video">
  127. <iframe src="https://www.youtube-nocookie.com/embed/rhW3kAExCik?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  128. </div>
  129. .. _editor-keymaps:
  130. You can also customize the :ref:`text editor <file-editor>` to use vim, emacs, or Sublime Text
  131. keyboard maps by using the Text Editor Key Map submenu in the Settings
  132. menu:
  133. .. raw:: html
  134. <div class="jp-youtube-video">
  135. <iframe src="https://www.youtube-nocookie.com/embed/COheO7sA4-U?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  136. </div>