Theme

Start Here

Start from the smallest working snippet, then move to interactive examples and the full API contract below.

Styled quick start

Copy this entrypoint first. It includes the imports required to get the component on screen.

svelte
<script lang="ts">
  import '@dryui/ui/themes/default.css';
  import '@dryui/ui/themes/dark.css';
  import { Splitter } from '@dryui/ui';
</script>

<Splitter.Root>
  <Splitter.Panel>...</Splitter.Panel>
  <Splitter.Handle>...</Splitter.Handle>
</Splitter.Root>

Import options

Root package

ts
import { Splitter } from '@dryui/ui'

Per-component subpath

ts
import { Splitter } from '@dryui/ui/splitter'

Customize

Use the interactive examples to see common variants, states, and composition patterns before building your own.

Horizontal Split

Left panel
Right panel
svelte
<div class="splitter-root splitter-root--horizontal">
  <Splitter.Root orientation="horizontal" sizes={[50, 50]}>
    <Splitter.Panel index={0}>
      <div>Left panel</div>
    </Splitter.Panel>
    <Splitter.Handle index={0} />
    <Splitter.Panel index={1}>
      <div>Right panel</div>
    </Splitter.Panel>
  </Splitter.Root>
</div>

Vertical Split

Top panel
Bottom panel
svelte
<div class="splitter-root splitter-root--vertical">
  <Splitter.Root orientation="vertical" sizes={[50, 50]}>
    <Splitter.Panel index={0}>
      <div>Top panel</div>
    </Splitter.Panel>
    <Splitter.Handle index={0} />
    <Splitter.Panel index={1}>
      <div>Bottom panel</div>
    </Splitter.Panel>
  </Splitter.Root>
</div>

Structure

Compound components always start with Splitter.Root. Use this structure block to understand required wrappers before you wire state or styling.

Splitter.Root
  Splitter.Panel
  Splitter.Handle
Splitter.Root Splitter.PanelSplitter.Handle

Compose

The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.

Compound component. Start with Splitter.Root, then add only the parts you need.

Splitter.PanelSplitter.Handle

Splitter.Root

Prop Type Default Required Bindable
orientation
horizontalvertical
sizes
number[]
$bindable([50
children
Snippet

Forwards <div> attributes via rest props. Common examples: id, style, role.

Splitter.Panel

Prop Type Default Required Bindable
index
number
children
Snippet

Forwards <div> attributes via rest props. Common examples: id, style, role.

Splitter.Handle

Prop Type Default Required Bindable
index
number
children
Snippet

Forwards <div> attributes via rest props. Common examples: id, style, role.