page-headers.mdx 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. ---
  2. title: Page headers
  3. summary: Page heading examples for Tabler
  4. description: Examples of Tabler page headers.
  5. ---
  6. ## Simple header
  7. ```html example vcentered
  8. <div class="page-header">
  9. <div class="row align-items-center">
  10. <div class="col">
  11. <div class="page-pretitle">Overview</div>
  12. <h2 class="page-title">Dashboard</h2>
  13. </div>
  14. <div class="col-auto ms-auto">
  15. <div class="btn-list">
  16. <span class="d-none d-sm-inline">
  17. <a href="#" class="btn"> New view </a>
  18. </span>
  19. <a
  20. href="#"
  21. class="btn btn-primary d-none d-sm-inline-block"
  22. data-bs-toggle="modal"
  23. data-bs-target="#modal-report"
  24. >
  25. <svg
  26. xmlns="http://www.w3.org/2000/svg"
  27. class="icon"
  28. width="24"
  29. height="24"
  30. viewBox="0 0 24 24"
  31. stroke-width="2"
  32. stroke="currentColor"
  33. fill="none"
  34. stroke-linecap="round"
  35. stroke-linejoin="round"
  36. >
  37. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  38. <line x1="12" y1="5" x2="12" y2="19" />
  39. <line x1="5" y1="12" x2="19" y2="12" />
  40. </svg>
  41. Create new report
  42. </a>
  43. <a
  44. href="#"
  45. class="btn btn-primary d-sm-none btn-icon"
  46. data-bs-toggle="modal"
  47. data-bs-target="#modal-report"
  48. aria-label="Create new report"
  49. >
  50. <svg
  51. xmlns="http://www.w3.org/2000/svg"
  52. class="icon"
  53. width="24"
  54. height="24"
  55. viewBox="0 0 24 24"
  56. stroke-width="2"
  57. stroke="currentColor"
  58. fill="none"
  59. stroke-linecap="round"
  60. stroke-linejoin="round"
  61. >
  62. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  63. <line x1="12" y1="5" x2="12" y2="19" />
  64. <line x1="5" y1="12" x2="19" y2="12" />
  65. </svg>
  66. </a>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. ```
  72. ## With meta, avatar and actions
  73. ```html example vcentered
  74. <div class="page-header">
  75. <div class="row align-items-center">
  76. <div class="col-auto">
  77. <span
  78. class="avatar avatar-md"
  79. style="background-image: url(/samples/avatars/023m.jpg)"
  80. ></span>
  81. </div>
  82. <div class="col">
  83. <h2 class="page-title">Paweł Kuna</h2>
  84. <div class="page-subtitle">
  85. <div class="row">
  86. <div class="col-auto">
  87. <svg
  88. xmlns="http://www.w3.org/2000/svg"
  89. class="icon"
  90. width="24"
  91. height="24"
  92. viewBox="0 0 24 24"
  93. stroke-width="2"
  94. stroke="currentColor"
  95. fill="none"
  96. stroke-linecap="round"
  97. stroke-linejoin="round"
  98. >
  99. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  100. <line x1="3" y1="21" x2="21" y2="21" />
  101. <path d="M5 21v-14l8 -4v18" />
  102. <path d="M19 21v-10l-6 -4" />
  103. <line x1="9" y1="9" x2="9" y2="9.01" />
  104. <line x1="9" y1="12" x2="9" y2="12.01" />
  105. <line x1="9" y1="15" x2="9" y2="15.01" />
  106. <line x1="9" y1="18" x2="9" y2="18.01" />
  107. </svg>
  108. <a href="#" class="text-reset">UI Designer at Tabler</a>
  109. </div>
  110. <div class="col-auto">
  111. <svg
  112. xmlns="http://www.w3.org/2000/svg"
  113. class="icon"
  114. width="24"
  115. height="24"
  116. viewBox="0 0 24 24"
  117. stroke-width="2"
  118. stroke="currentColor"
  119. fill="none"
  120. stroke-linecap="round"
  121. stroke-linejoin="round"
  122. >
  123. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  124. <circle cx="9" cy="7" r="4" />
  125. <path d="M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2" />
  126. <path d="M16 3.13a4 4 0 0 1 0 7.75" />
  127. <path d="M21 21v-2a4 4 0 0 0 -3 -3.85" />
  128. </svg>
  129. <a href="#" class="text-reset">194 friends</a>
  130. </div>
  131. <div class="col-auto text-success">
  132. <svg
  133. xmlns="http://www.w3.org/2000/svg"
  134. class="icon icon-tabler icon-tabler-check"
  135. width="24"
  136. height="24"
  137. viewBox="0 0 24 24"
  138. stroke-width="2"
  139. stroke="currentColor"
  140. fill="none"
  141. stroke-linecap="round"
  142. stroke-linejoin="round"
  143. >
  144. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  145. <path d="M5 12l5 5l10 -10"></path>
  146. </svg>
  147. Verified
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. <div class="col-auto d-none d-md-flex">
  153. <a href="#" class="btn btn-primary">
  154. <svg
  155. xmlns="http://www.w3.org/2000/svg"
  156. class="icon"
  157. width="24"
  158. height="24"
  159. viewBox="0 0 24 24"
  160. stroke-width="2"
  161. stroke="currentColor"
  162. fill="none"
  163. stroke-linecap="round"
  164. stroke-linejoin="round"
  165. >
  166. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  167. <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" />
  168. <line x1="8" y1="9" x2="16" y2="9" />
  169. <line x1="8" y1="13" x2="14" y2="13" />
  170. </svg>
  171. Send message
  172. </a>
  173. </div>
  174. </div>
  175. </div>
  176. ```
  177. ## With meta, search and actions
  178. ```html example vcentered
  179. <div class="page-header">
  180. <div class="row align-items-center">
  181. <div class="col">
  182. <h2 class="page-title">Gallery</h2>
  183. <div class="text-secondary mt-1">1-12 of 241 photos</div>
  184. </div>
  185. <div class="col-auto ms-auto d-print-none">
  186. <div class="d-flex">
  187. <div class="me-3 d-none d-md-block">
  188. <div class="input-icon">
  189. <input type="text" class="form-control" placeholder="Search…" />
  190. <span class="input-icon-addon">
  191. <svg
  192. xmlns="http://www.w3.org/2000/svg"
  193. class="icon icon-tabler icon-tabler-search"
  194. width="24"
  195. height="24"
  196. viewBox="0 0 24 24"
  197. stroke-width="2"
  198. stroke="currentColor"
  199. fill="none"
  200. stroke-linecap="round"
  201. stroke-linejoin="round"
  202. >
  203. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  204. <path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path>
  205. <path d="M21 21l-6 -6"></path>
  206. </svg>
  207. </span>
  208. </div>
  209. </div>
  210. <a href="#" class="btn btn-primary">
  211. <svg
  212. xmlns="http://www.w3.org/2000/svg"
  213. class="icon icon-tabler icon-tabler-plus"
  214. width="24"
  215. height="24"
  216. viewBox="0 0 24 24"
  217. stroke-width="2"
  218. stroke="currentColor"
  219. fill="none"
  220. stroke-linecap="round"
  221. stroke-linejoin="round"
  222. >
  223. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  224. <path d="M12 5l0 14"></path>
  225. <path d="M5 12l14 0"></path>
  226. </svg>
  227. Add photo
  228. </a>
  229. </div>
  230. </div>
  231. </div>
  232. </div>
  233. ```
  234. ## Bordered header
  235. A page header with a border to separate content is an effective way to organize and present information in a clear and visually appealing way.
  236. ```html example fullpage
  237. <div class="page-header page-header-border">
  238. <div class="container-fluid">
  239. <div class="row align-items-center">
  240. <div class="col">
  241. <h2 class="page-title">Improve cards with no border</h2>
  242. <div class="text-secondary mt-1">
  243. <a href="#" class="text-reset">#693</a>
  244. opened by <a href="#" class="text-body">Jeffie Lewzey</a> in
  245. <a href="#" class="text-body">Calendar Page</a>
  246. </div>
  247. </div>
  248. <div class="col-auto">
  249. <div class="btn-list">
  250. <a href="#" class="btn">
  251. <svg
  252. xmlns="http://www.w3.org/2000/svg"
  253. class="icon"
  254. width="24"
  255. height="24"
  256. viewBox="0 0 24 24"
  257. stroke-width="2"
  258. stroke="currentColor"
  259. fill="none"
  260. stroke-linecap="round"
  261. stroke-linejoin="round"
  262. >
  263. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  264. <path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" />
  265. <path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" />
  266. <path d="M16 5l3 3" />
  267. </svg>
  268. Edit
  269. </a>
  270. <a href="#" class="btn d-none d-md-inline-flex">
  271. <svg
  272. xmlns="http://www.w3.org/2000/svg"
  273. class="icon"
  274. width="24"
  275. height="24"
  276. viewBox="0 0 24 24"
  277. stroke-width="2"
  278. stroke="currentColor"
  279. fill="none"
  280. stroke-linecap="round"
  281. stroke-linejoin="round"
  282. >
  283. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  284. <path
  285. 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"
  286. />
  287. <path d="M9 17v1a3 3 0 0 0 6 0v-1" />
  288. </svg>
  289. Subscribe
  290. </a>
  291. </div>
  292. </div>
  293. </div>
  294. </div>
  295. </div>
  296. ```
  297. ## Header with breadcrumb and actions
  298. 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.
  299. 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.
  300. ```html example vcentered
  301. <div class="page-header">
  302. <div class="row align-items-center mw-100">
  303. <div class="col">
  304. <div class="mb-1">
  305. <ol class="breadcrumb" aria-label="breadcrumbs">
  306. <li class="breadcrumb-item">
  307. <a href="#">Home</a>
  308. </li>
  309. <li class="breadcrumb-item">
  310. <a href="#">Library</a>
  311. </li>
  312. <li class="breadcrumb-item active" aria-current="page">
  313. <a href="#">Articles</a>
  314. </li>
  315. </ol>
  316. </div>
  317. <h2 class="page-title">
  318. <span class="text-truncate"
  319. >Knights of Ni, we are but simple travelers who seek the enchanter who lives beyond these
  320. woods.</span
  321. >
  322. </h2>
  323. </div>
  324. <div class="col-auto">
  325. <div class="btn-list">
  326. <a href="#" class="btn d-none d-md-inline-flex">
  327. <svg
  328. xmlns="http://www.w3.org/2000/svg"
  329. class="icon"
  330. width="24"
  331. height="24"
  332. viewBox="0 0 24 24"
  333. stroke-width="2"
  334. stroke="currentColor"
  335. fill="none"
  336. stroke-linecap="round"
  337. stroke-linejoin="round"
  338. >
  339. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  340. <path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" />
  341. <path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" />
  342. <path d="M16 5l3 3" />
  343. </svg>
  344. Edit
  345. </a>
  346. <a href="#" class="btn btn-primary"> Publish </a>
  347. </div>
  348. </div>
  349. </div>
  350. </div>
  351. ```