ClassiJSYou already know it. Star on GitHub

Examples

Getting Started
OverviewInstallationGetting StartedWork List
Components
Buttons
Basic ButtonsToggle ButtonsButton StatesButton IconsMenu ButtonsMenu Bottom ButtonsSplit ButtonsSplit Bottom ButtonsLeft Text ButtonsRight Text ButtonsLink ButtonsButton with CountSegmented ButtonsVertical Segmented Buttons
Tabs
Basic TabsPlain TabsFramed TabsIcon TabsAdvanced TabsHeader TabsRemote Content TabsLazy TabsReorderable TabsOverflow TabsTab Positions
Menus and Toolbars
Basic ToolbarDocked ToolbarsBreadcrumb ToolbarToolbar OverflowToolbar MenusStatus Bar
Panels
Basic PanelFramed PanelHeader Positioning
Feedback and Overlays
Anchored TooltipsPointer TooltipsRich TooltipsClosable TooltipsPopoversLoading MaskProgress BarWindowsMessage BoxesToast Notifications
Form Fields
Forms and FieldsetsField GroupsCombo BoxTag FieldNumber FieldDate/Month PickerField TypesCheckboxRadioText FieldText AreaColor FieldSelect Field
Advanced Forms
Multi-selectSlider FieldRating FieldForm ValidationRepeatable FieldsUpload ProgressForm Examples
Trees
Basic TreesJSON Tree
Code Block
Basic Code BlockTitle and Line NumbersWrapped CodeEditable Code
Navigation
Thumbnail View

No results found.

Panels - Header Positioning

Panels - Header Positioning

Header Positioning

Options
NameValueTypeDefaultDescription
titlestringNoneDisplays a title in the header.
paddedbooleanfalseAdds padding around the contents.
collapsiblebooleanfalseMakes the header toggle the panel body.
collapsedbooleanfalseStarts with the panel body hidden.
framedbooleanfalseUses the rounded framed appearance.
headerPosition
"top" | "right" | "bottom" | "left""top"Places the header around the panel body.
NameValueTypeDefaultDescription
type
"pin" | "refresh" | "search" | "save"NoneSelects the tool glyph.
labelstringtool nameProvides the accessible button name.
disabledbooleanfalseDisables the tool button.
Styles
--cj-panel-header-background#CBDDF3
--cj-panel-title-color#04408C
--cj-panel-border#99BCE8
--cj-panel-background#FFFFFF
--cj-panel-color#000000
--cj-panel-framed-background#DFE9F6
/* Choose a color to generate CSS overrides. */
_panel.scssscss
.cj-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-inline-size: 100%;
  border: 1px solid var(--cj-panel-border, #99bce8);
  background: var(--cj-panel-background, #fff);
}
.cj-panel__header {
  box-sizing: border-box;
  display: flex;
  min-height: 27px;
  padding: 5px;
  color: var(--cj-panel-title-color, #04408c);
  background: var(
    --cj-panel-header-background,
    #cbddf3
      linear-gradient(
        #dae7f6,
        #cddef3 45%,
        #abc7ec 46% 50%,
        #b8cfee 51%,
        #cbddf3
      )
  );
  box-shadow: inset 0 1px #f3f7fb;
  border-bottom: 1px solid var(--cj-panel-border, #99bce8);
  font: bold 11px/15px var(--cj-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.cj-panel__header[hidden] {
  display: none;
}
.cj-panel__header > .cj-panel__heading {
  display: flex;
  justify-content: space-between;
  flex: 1;
  gap: 2px;
  min-inline-size: 0;
  font: inherit;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
}
.cj-panel__icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 16px;
  inline-size: 16px;
  block-size: 16px;
  margin-inline-end: 0;
}
.cj-panel__icon :is(svg, img) {
  display: block;
  max-inline-size: 16px;
  max-block-size: 16px;
}
.cj-panel__title {
  flex: 1;
  min-inline-size: 0;
  padding: 0 2px 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cj-panel__tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  block-size: 15px;
}
.cj-panel-tool {
  box-sizing: border-box;
  inline-size: 15px;
  block-size: 15px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4b6d98;
  cursor: pointer;
}
.cj-panel-tool:focus-visible {
  outline: 1px dotted #464646;
  outline-offset: -1px;
}
.cj-panel-tool:hover {
  background: transparent;
}
.cj-panel-tool__glyph {
  display: block;
  inline-size: 15px;
  block-size: 15px;
  background: url("./panel-tool-glyphs.svg") 0 -135px / 30px 360px no-repeat;
}
.cj-panel-tool--refresh .cj-panel-tool__glyph {
  background-position-y: -225px;
}
.cj-panel-tool--search .cj-panel-tool__glyph {
  background-position-y: -270px;
}
.cj-panel-tool--save .cj-panel-tool__glyph {
  background-position-y: -285px;
}
.cj-panel-tool--custom .cj-panel-tool__glyph {
  display: grid;
  place-items: center;
  background: none;
}
.cj-panel-tool--custom :is(svg, .cj-icon) {
  inline-size: 13px;
  block-size: 13px;
}
.cj-panel-tool:hover .cj-panel-tool__glyph {
  background-position-x: -15px;
}
.cj-panel__body {
  flex: 1;
  min-block-size: 0;
  color: var(--cj-panel-color, #000);
  font: 12px var(--cj-font);
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.cj-panel__body[hidden] {
  display: none;
}
.cj-panel__body--padded {
  padding: var(--cj-panel-padding, 10px);
}
.cj-panel--collapsible > summary {
  list-style: none;
  cursor: pointer;
}
.cj-panel--collapsible > summary::-webkit-details-marker {
  display: none;
}
.cj-panel--collapsible:not([open]) > summary {
  min-height: 26px;
  border-bottom: 0;
}
.cj-panel--collapsible:not([open]) > .cj-panel__body {
  display: none;
}
.cj-panel--collapsible:not([open]) {
  height: auto !important;
  block-size: auto !important;
}
.cj-panel__toggle {
  flex: 0 0 15px;
  block-size: 15px;
  background: url("./panel-toggle.svg") 0 0 / 30px 30px no-repeat;
}
.cj-panel--collapsible:not([open]) .cj-panel__toggle {
  background-position-y: -15px;
}
.cj-panel__toggle:hover {
  background-position-x: -15px;
}
.cj-panel--collapsible > summary:focus-visible {
  outline: none;
}
.cj-panel--collapsible > summary:focus-visible .cj-panel__toggle {
  outline: 1px dotted #464646;
}
.cj-panel--body-collapsed {
  block-size: auto !important;
}
.cj-panel--body-collapsed > .cj-panel__header {
  min-height: 26px;
  border-bottom: 0;
}
.cj-panel--framed {
  position: relative;
  border-width: 1px;
  border-radius: 4px;
  border-color: var(--cj-panel-framed-border, #99bce8);
  background: var(--cj-panel-framed-background, #dfe9f6);
  overflow: hidden;
}
.cj-panel--framed > .cj-panel__header {
  border-bottom: 1px solid var(--cj-panel-border, #99bce8);
  box-shadow:
    inset 1px 0 #f3f7fb,
    inset -1px 0 #f3f7fb,
    inset 0 1px #f3f7fb;
}
.cj-panel--framed > .cj-panel__body--padded {
  padding: calc(var(--cj-panel-padding, 10px) + 4px);
}
.cj-panel--header-bottom {
  flex-direction: column-reverse;
}
.cj-panel--header-left,
.cj-panel--header-right {
  flex-direction: row;
}
.cj-panel--header-right {
  flex-direction: row-reverse;
}
.cj-panel--header-left > .cj-panel__header,
.cj-panel--header-right > .cj-panel__header {
  position: relative;
  flex: 0 0 27px;
  inline-size: 27px;
  padding: 5px;
  border-bottom: 0;
}
.cj-panel--header-left > .cj-panel__header {
  background: var(
    --cj-panel-header-background,
    #cbddf3
      linear-gradient(
        to left,
        #dae7f6,
        #cddef3 45%,
        #abc7ec 46% 50%,
        #b8cfee 51%,
        #cbddf3
      )
  );
  box-shadow: inset 1px 0 #f3f7fb;
}
.cj-panel--header-right > .cj-panel__header {
  background: var(
    --cj-panel-header-background,
    #cbddf3
      linear-gradient(
        to left,
        #dae7f6,
        #cddef3 45%,
        #abc7ec 46% 50%,
        #b8cfee 51%,
        #cbddf3
      )
  );
  box-shadow: inset -1px 0 #f3f7fb;
}
.cj-panel--header-left > .cj-panel__header {
  border-right: 1px solid var(--cj-panel-border, #99bce8);
}
.cj-panel--header-right > .cj-panel__header {
  border-left: 1px solid var(--cj-panel-border, #99bce8);
}
.cj-panel--header-left .cj-panel__heading,
.cj-panel--header-right .cj-panel__heading {
  position: absolute;
  inset-block-start: 5px;
  inset-inline-start: 21px;
  inline-size: max-content;
  writing-mode: horizontal-tb;
  transform: rotate(90deg);
  transform-origin: 0 0;
  align-items: center;
}
.cj-panel--header-left .cj-panel__icon,
.cj-panel--header-right .cj-panel__icon {
  margin-inline-end: 0;
}
.cj-panel--header-left .cj-panel__title,
.cj-panel--header-right .cj-panel__title {
  flex: none;
}
.cj-panel--header-bottom > .cj-panel__header {
  border-top: 1px solid var(--cj-panel-border, #99bce8);
  border-bottom: 0;
  box-shadow: inset 0 -1px #f3f7fb;
}

Place a panel header on any side.

Panel

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Framed Panel

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Code

---
import { Panel } from 'classijs';
import 'classijs/styles.css';
---
<Panel title="Details" padded headerPosition="right">
  Panel content
</Panel>