interface.rst 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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. .. _sidebars:
  43. Left and Right Sidebar
  44. ----------------------
  45. .. _left-sidebar:
  46. The left sidebar contains a number of commonly-used tabs including:
  47. - a file browser,
  48. - a list of tabs in the main work and of running kernels and terminals,
  49. - the command palette (in 3.0+ moved to a modal window accessible with a :ref:`keyboard shortcut <access-palette>`),
  50. - the :ref:`table of contents <toc>`,
  51. - the :ref:`extension manager <extension_manager>`.
  52. .. image:: images/interface_left.png
  53. :align: center
  54. :class: jp-screenshot
  55. :alt: A screenshot of the primary JupyterLab sidebar showing a variety of files in the file browser.
  56. .. _right-sidebar:
  57. The right sidebar contains:
  58. - the property inspector (active in notebooks),
  59. - the :ref:`debugger <debugger>`.
  60. .. image:: images/interface_right.png
  61. :align: center
  62. :class: jp-screenshot
  63. :alt: A screenshot of the secondary JupyterLab sidebar showing the property inspector.
  64. The column that allows to switch between tabs is called Activity Bar in JupyterLab.
  65. .. _left-sidebar-toggle:
  66. The sidebars can be collapsed or expanded by selecting "Show Left Sidebar"
  67. or "Show Right Sidebar" in the View menu or by clicking on the active sidebar tab:
  68. The location of tabs can be switched between the left and the right sidebar from the :ref:`context menu <context-menus-rightclick>`.
  69. .. raw:: html
  70. <div class="jp-youtube-video">
  71. <iframe src="https://www.youtube-nocookie.com/embed/PlJGecfetek?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  72. </div>
  73. JupyterLab extensions can add additional panels to the sidebars.
  74. .. _main-area:
  75. Main Work Area
  76. --------------
  77. .. _main-area-vid:
  78. The main work area in JupyterLab enables you to arrange documents (notebooks,
  79. text files, etc.) and other activities (terminals, code consoles, etc.) into
  80. panels of tabs that can be resized or subdivided. Drag a tab to the center of a
  81. tab panel to move the tab to the panel. Subdivide a tab panel by dragging a tab to
  82. the left, right, top, or bottom of the panel:
  83. .. raw:: html
  84. <div class="jp-youtube-video">
  85. <iframe src="https://www.youtube-nocookie.com/embed/Ka8qS7CO1XQ?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  86. </div>
  87. The work area has a single current activity. The tab for the current activity is
  88. marked with a colored top border (blue by default).
  89. .. _tabs:
  90. Tabs and Simple Interface Mode
  91. ------------------------------
  92. The Tabs panel in the left sidebar lists the open documents or
  93. activities in the main work area:
  94. .. image:: images/interface_tabs.png
  95. :align: center
  96. :class: jp-screenshot
  97. :alt: A screenshot of the tabs panel in JupyterLab that lists some sample documents.
  98. The same information is also available in the Tabs menu:
  99. .. image:: images/interface_tabs_menu.png
  100. :align: center
  101. :class: jp-screenshot
  102. :alt: A screenshot of the tabs menu in JupyterLab with a list of sample documents.
  103. .. _tabs-singledocument:
  104. It is often useful to focus on a single document or activity without closing
  105. other tabs in the main work area. Simple Interface mode enables this, while making
  106. it easy to return to your multi-activity layout in the main work area.
  107. Toggle Simple Interface mode using the View menu:
  108. .. raw:: html
  109. <div class="jp-youtube-video">
  110. <iframe src="https://www.youtube-nocookie.com/embed/DO7NOenMQC0?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  111. </div>
  112. When you leave Simple Interface mode, the original layout of the main
  113. area is restored.
  114. Context Menus
  115. -------------
  116. .. _context-menus-rightclick:
  117. Many parts of JupyterLab, such as notebooks, text files, code consoles,
  118. and tabs, have context menus that can be accessed by right-clicking on
  119. the element:
  120. .. raw:: html
  121. <div class="jp-youtube-video">
  122. <iframe src="https://www.youtube-nocookie.com/embed/y30fs6kg6fc?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  123. </div>
  124. .. _context-menus-shiftrightclick:
  125. The browser’s native context menu can be accessed by holding down
  126. ``Shift`` and right-clicking:
  127. .. raw:: html
  128. <div class="jp-youtube-video">
  129. <iframe src="https://www.youtube-nocookie.com/embed/XPPWW-7WJ40?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  130. </div>
  131. .. _shortcuts:
  132. Keyboard Shortcuts
  133. ------------------
  134. .. _shortcuts-settings:
  135. As in the classic Notebook, you can navigate the user interface through keyboard
  136. shortcuts. You can find and customize the current list of keyboard shortcuts by
  137. selecting the Advanced Settings Editor item in the Settings menu, then selecting
  138. Keyboard Shortcuts in the Settings tab.
  139. .. raw:: html
  140. <div class="jp-youtube-video">
  141. <iframe src="https://www.youtube-nocookie.com/embed/rhW3kAExCik?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  142. </div>
  143. .. _editor-keymaps:
  144. You can also customize the :ref:`text editor <file-editor>` to use vim, emacs, or Sublime Text
  145. keyboard maps by using the Text Editor Key Map submenu in the Settings
  146. menu:
  147. .. raw:: html
  148. <div class="jp-youtube-video">
  149. <iframe src="https://www.youtube-nocookie.com/embed/COheO7sA4-U?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  150. </div>