JSFiddle - React, Tailwind, and code Playground

HTML

<p id="toggleAside" class="toggle-aside">
  Przełącz
</p>

<div id="forum" class="forum">forum</div>
<aside id="aside" class="aside">Panel boczny</aside>

CSS

.forum,
.aside {
  float: left;
}

.forum {
  background: darkred;
  width: 70%;
}

.aside {
  background: red;
  width: 30%;
}

.toggle-aside {
  cursor: pointer;
}

JavaScript

$("#toggleAside").click(function() {
  if ($('#aside').is(':visible')) {
    $('#aside').hide();
    $("#forum").css({
      width: "100%"
    });
  } else {
    $('#aside').show();
    $("#forum").css({
      width: "70%"
    });
  }
});