{"id":2744,"date":"2022-08-11T16:17:02","date_gmt":"2022-08-11T21:17:02","guid":{"rendered":"https:\/\/xlinesoft.com\/blog\/?p=2744"},"modified":"2026-08-20T17:09:34","modified_gmt":"2026-08-20T22:09:34","slug":"how-to-create-a-beautiful-dashboard-theme","status":"publish","type":"post","link":"https:\/\/xlinesoft.com\/blog\/2022\/08\/11\/how-to-create-a-beautiful-dashboard-theme\/","title":{"rendered":"How to Create a Custom Dashboard Theme in PHPRunner"},"content":{"rendered":"<p>You do not need to import an entire third-party website theme to reproduce its look in PHPRunner. A dashboard can be styled by combining Page Designer settings, fonts, chart options, code snippets and a small amount of CSS while keeping the generated application structure intact.<\/p>\n<p>The example below starts with an existing dashboard design as inspiration and recreates the important visual ideas inside PHPRunner.<\/p>\n<p>For inspiration, we will use the <a href=\"https:\/\/demos.creative-tim.com\/material-dashboard-dark\/examples\/dashboard.html\" target=\"_blank\" rel=\"noopener\">Material Dashboard<\/a> design by Creative Tim. Here is the original design:<\/p>\n<p>\n<a href=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/original_theme.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/original_theme-600x325.png\" alt=\"Material Dashboard design used as inspiration\" width=\"600\" height=\"325\" class=\"alignnone size-medium wp-image-2746\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/original_theme-600x325.png 600w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/original_theme-768x416.png 768w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/original_theme-1024x555.png 1024w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/original_theme.png 1920w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br \/>\n<\/a>\n<\/p>\n<h2>Before you start<\/h2>\n<p>When recreating a design, identify the few elements that make the biggest visual difference first: page width, spacing, typography, card and background treatment, and chart colors. Reproducing those elements usually gets you most of the way to the desired look without adding a large amount of custom CSS.<\/p>\n<p>If you are starting a new project, also review the current built-in PHPRunner themes before creating a heavily customized theme from scratch. For example, the newer <a href=\"https:\/\/xlinesoft.com\/blog\/2026\/08\/06\/introducing-harbor-a-fresh-new-theme-for-phprunner-asprunner-net\/\">Harbor theme<\/a> provides a more modern starting point for many applications.<\/p>\n<h2>1. Create a dashboard<\/h2>\n<p>Start by creating a dashboard with three rows and adding dashboard elements to them. In this example, the first two rows contain charts and code snippets, while the last row contains grids.<\/p>\n<p>Use the <strong>Colors<\/strong> settings to customize the appearance of the dashboard elements. Here are the color settings used for the charts:<\/p>\n<p>\n<a href=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/charts_colors.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/charts_colors-600x346.png\" alt=\"PHPRunner dashboard chart color settings\" width=\"600\" height=\"346\" class=\"alignnone size-medium wp-image-2749\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/charts_colors-600x346.png 600w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/charts_colors.png 691w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br \/>\n<\/a>\n<\/p>\n<p>For code snippets, choose the <strong>Left icon<\/strong> style. The background color can be different for each snippet.<\/p>\n<p>\n<a href=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/snippet_colors.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/snippet_colors-600x348.png\" alt=\"PHPRunner code snippet color settings\" width=\"600\" height=\"348\" class=\"alignnone size-medium wp-image-2750\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/snippet_colors-600x348.png 600w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/snippet_colors.png 690w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br \/>\n<\/a>\n<\/p>\n<p>Here are the corresponding color settings for the grids. In this example, different grids use different header background colors.<\/p>\n<p>\n<a href=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/grid_colors.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/grid_colors-600x348.png\" alt=\"PHPRunner grid color settings\" width=\"600\" height=\"348\" class=\"alignnone size-medium wp-image-2753\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/grid_colors-600x348.png 600w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/grid_colors.png 690w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br \/>\n<\/a>\n<\/p>\n<h2>2. Add code snippets<\/h2>\n<p>Code snippets can be used for dashboard cards that display summary information. Here is the code used for the first snippet:<\/p>\n<div class=\"my-syntax-highlighter\">\n<pre><textarea id=\"mshighlighter\" class=\"mshighlighter\" language=\"php\" name=\"mshighlighter\" >\r\n$header = \"<div class='snip_title'>Used space<\/div>\r\n   <div class='snip_body'>49\/50GB<\/div>\";\r\necho \"<div class='snip_link'><span class='fa fa-user'>\r\n   <\/span> Get more space<\/div>\";<\/textarea><\/pre>\n<\/div>\n<p>The snippet contains several separate pieces of information. Each one is assigned its own CSS class, such as <strong>snip_title<\/strong>, so its appearance can be customized later with Custom CSS.<\/p>\n<h2>3. Customize fonts<\/h2>\n<p>PHPRunner lets you customize fonts directly in Page Designer. The original dashboard design uses the Roboto font, so we will use it here as well.<\/p>\n<p>In Page Designer, open the List page used by the first dashboard grid. Select the grid fields and headers and set the font family to <strong>Roboto<\/strong>. Then select the header elements and adjust their font size. You can set a different font size for regular grid fields.<\/p>\n<p>Repeat the same process for the other grids used on the dashboard.<\/p>\n<h2>4. Configure the top bar and sidebar<\/h2>\n<p>The top bar, sidebar and general application colors can be adjusted in Style Editor.<\/p>\n<p>\n<a href=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/style_editor.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/style_editor-600x165.png\" alt=\"PHPRunner Style Editor settings\" width=\"600\" height=\"165\" class=\"alignnone size-medium wp-image-2757\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/style_editor-600x165.png 600w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/style_editor-768x212.png 768w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/style_editor.png 968w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br \/>\n<\/a>\n<\/p>\n<p>On the same screen, use the grid color settings to customize the appearance of grids.<\/p>\n<p>\n<a href=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/style_grid_colors.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/style_grid_colors.png\" alt=\"PHPRunner grid colors in Style Editor\" width=\"399\" height=\"359\" class=\"alignnone size-full wp-image-2758\" \/><br \/>\n<\/a>\n<\/p>\n<p>At this stage, we have used only built-in PHPRunner functionality and already have a dashboard that is fairly close to the target design.<\/p>\n<p>\n<a href=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/phprunner_only.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/phprunner_only-600x325.png\" alt=\"Dashboard created using built-in PHPRunner styling options\" width=\"600\" height=\"325\" class=\"alignnone size-medium wp-image-2747\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/phprunner_only-600x325.png 600w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/phprunner_only-768x416.png 768w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/phprunner_only-1024x555.png 1024w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/phprunner_only.png 1920w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br \/>\n<\/a>\n<\/p>\n<p>The remaining differences are mostly details: sidebar styling, chart colors, snippet typography and positioning, and some additional grid styling.<\/p>\n<h2>5. Customize charts<\/h2>\n<p>More advanced chart customization can be done in the <strong>ChartModify<\/strong> event. The following example changes the chart background, axis labels and series appearance.<\/p>\n<div class=\"my-syntax-highlighter\">\n<pre><textarea id=\"mshighlighter\" class=\"mshighlighter\" language=\"javascript\" name=\"mshighlighter\" >\r\nchart.background().fill(\"#339465\");\r\n\r\nvar yTitle = chart.yAxis().title();\r\nyTitle.enabled(false);\r\n\r\nchart.xAxis().labels().fontColor(\"#BCDBD0\");\r\nchart.yAxis().labels().fontColor(\"#BCDBD0\");\r\n\r\nchart.xAxis().labels().format(function() {\r\n    var value = this.value;\r\n\r\n    \/\/ Limit the number of characters displayed\r\n    value = value.substr(0, 4);\r\n\r\n    return value;\r\n});\r\n\r\nvar series = chart.getSeriesAt(0);\r\nseries.color(\"#FFFFFF\");<\/textarea><\/pre>\n<\/div>\n<p>You can use the same basic approach for the other charts and change individual settings such as the background color as needed.<\/p>\n<p><strong>Note:<\/strong> ChartModify is the correct place for advanced chart customization, but individual AnyChart methods can change between versions. If you are adapting an older example, verify the chart API calls against the AnyChart version included with your current PHPRunner project.<\/p>\n<h2>6. Add Custom CSS<\/h2>\n<p>Custom CSS can handle the remaining visual details. Add the CSS in <strong>Style Editor &gt; Modify CSS<\/strong>.<\/p>\n<p>The example below styles the page background, sidebar, dashboard grids and code snippets.<\/p>\n<div class=\"my-syntax-highlighter\">\n<pre><textarea id=\"mshighlighter\" class=\"mshighlighter\" language=\"css\" name=\"mshighlighter\" >\r\n\/* body background *\/\r\n\r\nbody {\r\n    background: #1a2035 !important;\r\n}\r\n\r\n\/* left sidebar background *\/\r\n\r\n.r-left:before {\r\n    content: ' ';\r\n    background-image: url(..\/..\/images\/sidebar-2.jpg);\r\n    background-position: 50%;\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    height: 98%;\r\n    width: 100%;\r\n}\r\n\r\n#mCSB_1 {\r\n    opacity: 0.95;\r\n    height: 100%;\r\n    background: #1f283e;\r\n}\r\n\r\n\/*\r\n    grids\r\n    make sure to replace grid IDs with your own\r\n*\/\r\n\r\n#dashelement_categories_grid1 .panel-heading,\r\n#dashelement_customers_grid1 .panel-heading {\r\n    padding: 17px;\r\n}\r\n\r\n#dashelement_categories_grid1 td,\r\n#dashelement_customers_grid1 td {\r\n    border-top-width: 1px;\r\n    border-color: hsla(0,0%,71%,.1);\r\n    padding: 9px;\r\n}\r\n\r\n\/* code snippets *\/\r\n\r\n.snip_title {\r\n    color: #8b92a9;\r\n    text-align: right;\r\n    font-family: 'Roboto';\r\n    font-size: 14px;\r\n}\r\n\r\n.snip_body {\r\n    color: #606477;\r\n    text-align: right;\r\n    font-family: 'Roboto';\r\n    font-size: 25px;\r\n}\r\n\r\n.snip_link {\r\n    color: #a9afbbd1;\r\n    text-align: right;\r\n    font-family: 'Roboto';\r\n    font-size: 12px;\r\n    padding-top: 20px;\r\n}<\/textarea><\/pre>\n<\/div>\n<p>Some CSS selectors in this example, especially dashboard element IDs and selectors related to the sidebar, are specific to the project and PHPRunner interface used when the example was created. Inspect the generated page and adjust those selectors if necessary when applying the technique to a current project.<\/p>\n<h2>Final result<\/h2>\n<p>After combining the built-in theme and Page Designer settings with chart customization and a relatively small amount of CSS, the finished dashboard looks like this:<\/p>\n<p>\n<a href=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/final_result.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/final_result-600x325.png\" alt=\"Completed custom PHPRunner dashboard theme\" width=\"600\" height=\"325\" class=\"alignnone size-medium wp-image-2745\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/final_result-600x325.png 600w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/final_result-768x416.png 768w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/final_result-1024x555.png 1024w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2022\/08\/final_result.png 1920w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br \/>\n<\/a>\n<\/p>\n<p>The important point is that you do not need to reproduce every detail of an external theme or replace the generated application structure. Start with PHPRunner&#8217;s built-in styling options, reproduce the major visual elements in Page Designer, and use custom CSS or ChartModify only where they provide a noticeable improvement.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You do not need to import an entire third-party website theme to reproduce its look in PHPRunner. A dashboard can be styled by combining Page Designer settings, fonts, chart options, code snippets and a small amount of CSS while keeping the generated application structure intact. The example below starts with an existing dashboard design as inspiration and recreates the important visual ideas inside PHPRunner. For inspiration, we will use the Material Dashboard design by Creative Tim. Here is the original design: Before you start When&#8230;<span class=\"clearfix clearfix-post\"><\/span><a href=\"https:\/\/xlinesoft.com\/blog\/2022\/08\/11\/how-to-create-a-beautiful-dashboard-theme\/\" class=\"more-link\">Continue Reading <span class=\"screen-reader-text\">&#8220;How to Create a Custom Dashboard Theme in PHPRunner&#8221;<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,10,1,8],"tags":[],"class_list":["post-2744","post","type-post","status-publish","format-standard","hentry","category-asp-net","category-news","category-php-category","category-tutorials"],"_links":{"self":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/2744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/comments?post=2744"}],"version-history":[{"count":22,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/2744\/revisions"}],"predecessor-version":[{"id":3452,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/2744\/revisions\/3452"}],"wp:attachment":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/media?parent=2744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/categories?post=2744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/tags?post=2744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}