Splitter

Live Demos Hub
GitHub ↗

Splitter

Interactive production-grade hypermedia component for HTMXUI.

Interactive Preview

Pane 1
Pane 2

HTML Source

<!-- 
  Component: splitter.html
  Configurable State: themeColor ('primary'|'secondary'|'destructive'), size ('sm'|'md'|'lg'), isOpen (boolean)
  Usage: Bind styles dynamically using hx-class="{ 'bg-primary': themeColor === 'primary' }" or hx-style="{ width: size === 'lg' ? '100%' : 'auto' }"
-->
<div hx-ext="reactive" hx-state="{ themeColor: \'primary\', size: \'md\', isOpen: false }"  class="flex w-full h-[200px] border border-border rounded-md">
  <div class="flex-1 p-4 bg-background">Pane 1</div>
  <div class="w-1 cursor-col-resize bg-border hover:bg-primary transition-colors"></div>
  <div class="flex-1 p-4 bg-background">Pane 2</div>
</div>