page-headers.mdx 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. ---
  2. title: Page headers
  3. description: Page heading examples for Tabler
  4. ---
  5. ## Simple header
  6. ```html example code vcentered
  7. <div class="page-header">
  8. <div class="row align-items-center">
  9. <div class="col">
  10. <div class="page-pretitle">
  11. Overview
  12. </div>
  13. <h2 class="page-title">
  14. Dashboard
  15. </h2>
  16. </div>
  17. <div class="col-auto ms-auto">
  18. <div class="btn-list">
  19. <span class="d-none d-sm-inline">
  20. <a href="#" class="btn">
  21. New view
  22. </a>
  23. </span>
  24. <a href="#" class="btn btn-primary d-none d-sm-inline-block" data-bs-toggle="modal" data-bs-target="#modal-report">
  25. <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  26. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  27. <line x1="12" y1="5" x2="12" y2="19" />
  28. <line x1="5" y1="12" x2="19" y2="12" />
  29. </svg>
  30. Create new report
  31. </a>
  32. <a href="#" class="btn btn-primary d-sm-none btn-icon" data-bs-toggle="modal" data-bs-target="#modal-report" aria-label="Create new report">
  33. <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  34. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  35. <line x1="12" y1="5" x2="12" y2="19" />
  36. <line x1="5" y1="12" x2="19" y2="12" />
  37. </svg>
  38. </a>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. ```
  44. ## With meta, avatar and actions
  45. ```html example code vcentered
  46. <div class="page-header">
  47. <div class="row align-items-center">
  48. <div class="col-auto">
  49. <span class="avatar avatar-md" style="background-image: url(/samples/avatars/023m.jpg)"></span>
  50. </div>
  51. <div class="col">
  52. <h2 class="page-title">Paweł Kuna</h2>
  53. <div class="page-subtitle">
  54. <div class="row">
  55. <div class="col-auto">
  56. <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  57. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  58. <line x1="3" y1="21" x2="21" y2="21" />
  59. <path d="M5 21v-14l8 -4v18" />
  60. <path d="M19 21v-10l-6 -4" />
  61. <line x1="9" y1="9" x2="9" y2="9.01" />
  62. <line x1="9" y1="12" x2="9" y2="12.01" />
  63. <line x1="9" y1="15" x2="9" y2="15.01" />
  64. <line x1="9" y1="18" x2="9" y2="18.01" />
  65. </svg>
  66. <a href="#" class="text-reset">UI Designer at Tabler</a>
  67. </div>
  68. <div class="col-auto">
  69. <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  70. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  71. <circle cx="9" cy="7" r="4" />
  72. <path d="M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2" />
  73. <path d="M16 3.13a4 4 0 0 1 0 7.75" />
  74. <path d="M21 21v-2a4 4 0 0 0 -3 -3.85" />
  75. </svg>
  76. <a href="#" class="text-reset">194 friends</a>
  77. </div>
  78. <div class="col-auto text-success">
  79. <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-check" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  80. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  81. <path d="M5 12l5 5l10 -10"></path>
  82. </svg>
  83. Verified
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="col-auto d-none d-md-flex">
  89. <a href="#" class="btn btn-primary">
  90. <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  91. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  92. <path d="M4 21v-13a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-9l-4 4" />
  93. <line x1="8" y1="9" x2="16" y2="9" />
  94. <line x1="8" y1="13" x2="14" y2="13" />
  95. </svg>
  96. Send message
  97. </a>
  98. </div>
  99. </div>
  100. </div>
  101. ```
  102. ## With meta, search and actions
  103. ```html example code vcentered
  104. <div class="page-header">
  105. <div class="row align-items-center">
  106. <div class="col">
  107. <h2 class="page-title">Gallery</h2>
  108. <div class="text-secondary mt-1">1-12 of 241 photos</div>
  109. </div>
  110. <div class="col-auto ms-auto d-print-none">
  111. <div class="d-flex">
  112. <div class="me-3 d-none d-md-block">
  113. <div class="input-icon">
  114. <input type="text" class="form-control" placeholder="Search…" />
  115. <span class="input-icon-addon">
  116. <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  117. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  118. <path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path>
  119. <path d="M21 21l-6 -6"></path>
  120. </svg>
  121. </span>
  122. </div>
  123. </div>
  124. <a href="#" class="btn btn-primary">
  125. <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-plus" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  126. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  127. <path d="M12 5l0 14"></path>
  128. <path d="M5 12l14 0"></path>
  129. </svg>
  130. Add photo
  131. </a>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. ```
  137. ## Bordered header
  138. Page header with a border to separate content is an effective way to organize and present information in a clear and visually appealing way.
  139. ```html example code fullpage
  140. <div class="page-header page-header-border">
  141. <div class="container-fluid">
  142. <div class="row align-items-center">
  143. <div class="col">
  144. <h2 class="page-title">Improve cards with no border</h2>
  145. <div class="text-secondary mt-1">
  146. <a href="#" class="text-reset">#693</a>
  147. opened by <a href="#" class="text-body">Jeffie Lewzey</a>
  148. in <a href="#" class="text-body">Calendar Page</a>
  149. </div>
  150. </div>
  151. <div class="col-auto">
  152. <div class="btn-list">
  153. <a href="#" class="btn">
  154. <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  155. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  156. <path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" />
  157. <path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" />
  158. <path d="M16 5l3 3" />
  159. </svg>
  160. Edit
  161. </a>
  162. <a href="#" class="btn d-none d-md-inline-flex">
  163. <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  164. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  165. <path d="M10 5a2 2 0 0 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6" />
  166. <path d="M9 17v1a3 3 0 0 0 6 0v-1" />
  167. </svg>
  168. Subscribe
  169. </a>
  170. </div>
  171. </div>
  172. </div>
  173. </div>
  174. </div>
  175. ```
  176. ## Header with breadcrumb and actions
  177. A page header with breadcrumb and actions is a common design element found in many websites and applications. The header typically appears at the top of the page and includes a breadcrumb trail, which shows the user the path they have taken to reach the current page. The breadcrumb can be clickable, allowing the user to navigate back to previous pages.
  178. In addition to the breadcrumb, the header often includes actions or buttons that allow the user to perform common tasks related to the current page. These actions may include things like adding a new item, editing existing content, or deleting items.
  179. ```html example code vcentered
  180. <div class="page-header">
  181. <div class="row align-items-center mw-100">
  182. <div class="col">
  183. <div class="mb-1">
  184. <ol class="breadcrumb" aria-label="breadcrumbs">
  185. <li class="breadcrumb-item"><a href="#">Home</a></li>
  186. <li class="breadcrumb-item"><a href="#">Library</a></li>
  187. <li class="breadcrumb-item active" aria-current="page"><a href="#">Articles</a></li>
  188. </ol>
  189. </div>
  190. <h2 class="page-title">
  191. <span class="text-truncate">Knights of Ni, we are but simple travelers who seek the enchanter who lives beyond these woods.</span>
  192. </h2>
  193. </div>
  194. <div class="col-auto">
  195. <div class="btn-list">
  196. <a href="#" class="btn d-none d-md-inline-flex">
  197. <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  198. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  199. <path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" />
  200. <path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" />
  201. <path d="M16 5l3 3" />
  202. </svg>
  203. Edit
  204. </a>
  205. <a href="#" class="btn btn-primary">
  206. Publish
  207. </a>
  208. </div>
  209. </div>
  210. </div>
  211. </div>
  212. ```