{"id":6016,"date":"2022-09-29T11:16:29","date_gmt":"2022-09-29T08:16:29","guid":{"rendered":"https:\/\/creativethemes.com\/blocksy\/?post_type=documentation&#038;p=6016"},"modified":"2026-10-08T10:19:42","modified_gmt":"2026-10-08T07:19:42","slug":"button","status":"publish","type":"documentation","link":"https:\/\/creativethemes.com\/blocksy\/docs\/header-elements\/button\/","title":{"rendered":"Button"},"content":{"rendered":"\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ad9f74e7aafe&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ad9f74e7aafe\" class=\"wp-block-image size-full has-lightbox wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2022\/09\/Screenshot-2022-09-29-at-11.23.35.png\" alt=\"Button element displayed inside the Blocksy Header Builder\" class=\"wp-image-6020\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">The Button element in the Header Builder.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Button<\/strong> element adds a prominent call to action to your website&#8217;s header. It can link visitors to another location or, with Blocksy Pro, open a Content Block pop-up directly from the header.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To use it, open the <strong>Customiser \u2192 Header<\/strong>, drag the <strong>Button<\/strong> element into the desired header row, and select it to configure its content, behaviour and appearance.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Granular Controls<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-995f960e wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:35%\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ad9f74e7f2ba&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ad9f74e7f2ba\" class=\"wp-block-image size-full has-lightbox wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"2600\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2022\/09\/Screenshot-2026-10-08-at-10.17.47.png\" alt=\"\" class=\"wp-image-15245\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Button element configuration options.<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:65%\">\n<h3 class=\"wp-block-heading\">Button Style<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Choose between the two available button presentations:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Filled<\/strong> &#8211; uses a solid background to give the button greater visual emphasis.<\/li>\n\n\n\n<li><strong>Outlined<\/strong> &#8211; uses a more subtle bordered presentation.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Size<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Select the overall size of the button:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Default<\/strong> &#8211; inherits the global button sizing configured under <strong>Customiser \u2192 General \u2192 Buttons<\/strong>.<\/li>\n\n\n\n<li><strong>Small<\/strong><\/li>\n\n\n\n<li><strong>Medium<\/strong><\/li>\n\n\n\n<li><strong>Large<\/strong><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Label<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Enter the primary text displayed inside the button.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong>Secondary Label<\/strong> is also available when you need to add a second line of supporting text to the button.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Click Behaviour<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Click Behaviour<\/strong> determines what happens when a visitor selects the button.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Link<\/strong> &#8211; sends the visitor to the URL configured for the button. The URL field also supports shortcodes where required.<\/li>\n\n\n\n<li><strong>Open Pop-up<\/strong> &#8211; opens a selected <a href=\"https:\/\/creativethemes.com\/blocksy\/docs\/modules\/pop-up-content-block\/\" target=\"_blank\" rel=\"noreferrer noopener\">Pop-up Content Block<\/a>. This behaviour is available with Blocksy Pro.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For regular links, additional options let you open the destination in a new browser tab and apply supported link relationship attributes such as <strong>nofollow<\/strong> or <strong>sponsored<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-group has-palette-color-8-color has-palette-color-1-background-color has-text-color has-background is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"is-style-info coblocks-alert-paragraph wp-block-paragraph\"><strong>Opening a pop-up<\/strong><br>The pop-up action requires Blocksy Pro and an existing Pop-up Content Block. Create and configure the pop-up first, then select it from the Button element&#8217;s click behaviour settings.<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Icon<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Add an icon alongside the button label using Blocksy&#8217;s icon picker. You can choose from the available built-in icons or upload a custom icon where supported.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The icon controls also let you adjust its presentation and visibility, including whether it should appear on particular responsive device views.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">User Visibility<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Control whether the Button element is displayed according to the visitor&#8217;s authentication state. This can be used to show a particular call to action only to logged-in users or only to logged-out visitors.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CSS Class<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Add a custom CSS class to the Button element when you need to target it with custom styling, JavaScript or a compatible third-party integration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Custom Aria Label<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Provide a custom ARIA label for the button when its visible text or icon does not clearly describe its purpose to assistive technologies. This gives screen reader users a more descriptive explanation of the action the button performs.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Button element adds a prominent call to action to your website&#8217;s header. It can link visitors to another location or, with Blocksy Pro, open a Content Block pop-up directly from the header. To use it, open the Customiser \u2192 Header, drag the Button element into the desired header row, and select it to configure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"doc_categories":[124],"class_list":["post-6016","documentation","type-documentation","status-publish","hentry","doc_categories-header-elements"],"acf":[],"_links":{"self":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/6016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation"}],"about":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/types\/documentation"}],"author":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/comments?post=6016"}],"version-history":[{"count":3,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/6016\/revisions"}],"predecessor-version":[{"id":15246,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/6016\/revisions\/15246"}],"wp:attachment":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/media?parent=6016"}],"wp:term":[{"taxonomy":"doc_categories","embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/doc_categories?post=6016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}