>
);
diff --git a/packages/block-library/src/loginout/index.php b/packages/block-library/src/loginout/index.php
index de90ebc12e379a..316211c87da56a 100644
--- a/packages/block-library/src/loginout/index.php
+++ b/packages/block-library/src/loginout/index.php
@@ -25,6 +25,15 @@ function render_block_core_loginout( $attributes ) {
false
);
+ // If display as button is enabled, wrap the link in button classes
+ if ( ! empty( $attributes['displayAsButton'] ) ) {
+ $classes .= ' wp-block-button';
+ $contents = sprintf(
+ '