Styling API

Stable CSS variables, selectors, data attributes, and styling-related props.

CSS Variables

Use this table when building a theme. Tilery reads visual tokens from CSS custom properties on the .tilery root element. Variables can also be inherited from ancestors in the same document.

For native popout windows, prefer variables that match .tilery or .tilery__popout directly. Wrapper-scoped variables are not available in the popup unless the copied stylesheet can still match the popup root.

VariableDefaultDescription
--tilery-bg#0e0f12Root background
--tilery-fg#d9dde3Root text color
--tilery-fontinheritFont family
--tilery-panel-bg#1a1c20Panel background
--tilery-panel-border#2a2d33Panel and tab-bar borders
--tilery-panel-gap4pxGap between panels
--tilery-outer-gap(panel-gap)Gap around the outer edge
--tilery-tabbar-bg#16181cTab bar background
--tilery-tabbar-height32pxTab bar height
--tilery-tab-font-size12pxTab label font size
--tilery-tab-fg#9aa1abInactive tab text color
--tilery-tab-active-bg(panel-bg)Active tab background
--tilery-tab-active-fg#f3f4f7Active tab text color
--tilery-tab-active-line-height1pxActive tab top indicator height
--tilery-tab-active-line-color(accent)Active tab top indicator color
--tilery-tab-hover-bgtransparentInactive tab hover background
--tilery-menu-bg#1f2228Panel action menu background
--tilery-menu-shadow0 8px 24px rgba(...)Panel action menu shadow
--tilery-action-hover-bgrgba(255,255,255,0.08)Action, close button, and menu item hover background
--tilery-accent#3884ffAccent (active indicator, focus)
--tilery-drop-bgrgba(56,132,255,0.18)Drop overlay background
--tilery-drop-borderrgba(56,132,255,0.6)Drop overlay border and insertion marker
--tilery-drop-insertion-width1pxTab-row drop insertion marker width
--tilery-resize-handle-active-bg(accent)Active resize divider line color
--tilery-resize-handle-active-line-size2pxActive resize divider line thickness

Stable Selectors

Use these selectors when variables are not enough, such as pill-shaped tabs or app-specific menu spacing. Keep overrides scoped to your own wrapper so they do not affect every Tilery instance.

SelectorDescription
.tileryRoot element for one Tilery instance
.tilery__innerInternal absolute positioning container
.tilery__main-layerCenter tiled-grid layer inside pinned edges
.tilery__panelPanel container
.tilery__tab-barPanel header containing tabs and actions
.tilery__tab-listScrollable tab row
.tilery__tabTab button
.tilery__tab-headerTab label wrapper
.tilery__tab-closeTab close button
.tilery__panel-contentPanel content host
.tilery__panel-actionsPanel action menu trigger
.tilery__panel-action-buttonPanel action button
.tilery__panel-menuPanel action menu
.tilery__panel-menu-itemPanel action menu item
.tilery__dividerOne-dimensional resize divider
.tilery__junctionT-junction resize control
.tilery__junction-resize-lineActive T-junction divider line highlight
.tilery__edge-resize-handlePinned edge panel resize control
.tilery__floating-resize-handleFloating panel resize control
.tilery__drop-overlayPanel drop preview
.tilery__drop-insertionTab-row insertion preview
.tilery__drag-ghostFloating drag preview
.tilery__tab-hostStable tab content portal host
.tilery__tab-contentRendered tab panel content wrapper
.tilery__popoutRoot class added inside native popout windows

Data Attributes

Use data attributes for component state that is not always expressible through pseudo-classes: active tabs, disabled resize handles, floating panels, and drop zones.

Hover and keyboard focus are normal browser interaction states, so style them with :hover and :focus-visible.

AttributeElementsDescription
data-panel-id.tilery__panelPanel id
data-tab-id.tilery__tabTab id
data-active.tilery__tab, .tilery__tab-contentWhether the tab or tab content is active
data-closable.tilery__tabWhether the tab can be closed
data-draggable.tilery__tab, .tilery__tab-bar, .tilery__panelWhether the tab, tab bar, or panel can start drag interactions
data-droppable.tilery__tab-bar, .tilery__panelWhether the panel area accepts drops
data-edge.tilery__panelEdge side for pinned edge panels
data-floating.tilery__panelWhether the panel is detached as a floating panel
data-popout.tilery__panelWhether the panel is in a native popout window
data-full-screen.tilery__panelWhether the panel is maximized
data-resizable.tilery__panelWhether the panel participates in resize interactions
data-drag-kind.tilery__drag-ghostWhether the drag preview represents a tab or panel
data-zone.tilery__drop-overlayCurrent panel drop preview zone
data-orientation.tilery__divider, .tilery__junction-resize-lineDivider or highlight orientation: horizontal or vertical
data-resize-active.tilery__divider, .tilery__junction, .tilery__edge-resize-handleSet while the resize control is being dragged
data-resize-disabled.tilery__divider, .tilery__junction, .tilery__edge-resize-handleSet when the resize control cannot resize its adjacent panels
data-resize-at-min.tilery__divider, .tilery__junctionSet when a resize boundary is clamped at a minimum size
data-resize-at-max.tilery__divider, .tilery__junctionSet when a resize boundary is clamped at a maximum size
data-edge-resize-side.tilery__edge-resize-handleEdge side controlled by the resize handle
data-floating-resize-edge.tilery__floating-resize-handleFloating panel resize edge or corner

Resize State Styling

Resize dividers and T-junction controls expose active, disabled, and min/max clamp states.

.tilery {
  --tilery-resize-handle-active-bg: color-mix(
    in srgb,
    var(--tilery-accent),
    transparent 38%
  );
}

.tilery__divider[data-resize-disabled],
.tilery__junction[data-resize-disabled] {
  cursor: default;
  opacity: 0.45;
}

.tilery__divider[data-resize-at-min]::before,
.tilery__divider[data-resize-at-max]::before {
  background: color-mix(in srgb, var(--tilery-accent), transparent 58%);
  opacity: 1;
}

.tilery__divider:hover::before,
.tilery__junction:hover::before,
.tilery__junction:hover::after {
  opacity: 1;
}

.tilery__divider:focus-visible {
  outline: 2px solid var(--tilery-accent);
  outline-offset: -2px;
}

Styling Props

Use these props when styling needs a runtime decision rather than a static CSS rule. For example, resizeHandleHitSize changes pointer hit targets, while action props decide whether built-in action controls render.

PropTypeDescription
resizeHandleHitSizenumberPointer hit target size for dividers and T-junction resize controls
showActionsButtonboolean | (panel: TileryPanel) => booleanControls whether built-in panel action buttons render
showNewTabButtonboolean | (panel: TileryPanel) => booleanControls whether the new-tab button renders
renderPanelActions(ctx: TileryPanelActionsRenderContext<TData>) => ReactNodeReplaces or extends the panel action area

Popout Styling Contract

Native popout panels render into a same-origin browser window through a React portal. React context is preserved, but the popup has its own document.

Tilery copies style tags and stylesheet links from the main document head, then creates a .tilery.tilery__popout root in the popup document.

The popup does not copy html or body classes, wrapper elements, inline styles, or CSS variables inherited from page ancestors.

For popout-safe themes, place variables in copied stylesheets that match .tilery or .tilery__popout directly.