Skip to content
tcpsystemsui

Theme

Colour scheme
Accent
Density
Radius
Esc

Splitter

Two panes separated by a draggable resize handle.

beta

Examples

Deployment panes

Studio · Production

Deployment healthy · All checks passed

Deployment panes.svelte
<script lang="ts">
	import Splitter from '@tcpsystems/ui/foundation/Splitter';
</script>

<Splitter label="Resize deployment panes">
	{#snippet start()}<p>Studio · Production</p>{/snippet}
	{#snippet end()}<p>Deployment healthy · All checks passed</p>{/snippet}
</Splitter>

Vertical panes

Acumen · Production deployment

Build complete. Health checks passed. Traffic switched.

Vertical panes.svelte
<script lang="ts">
	import Splitter from '@tcpsystems/ui/foundation/Splitter';
</script>

<Splitter orientation="vertical" value={40} label="Resize deployment and log panes">
	{#snippet start()}<p>Acumen · Production deployment</p>{/snippet}
	{#snippet end()}<p>Build complete. Health checks passed. Traffic switched.</p>{/snippet}
</Splitter>

Resize limits

Services · Studio, Acumen, Search

Drag the divider or use arrow keys. Home and End reach the limits.

Resize limits.svelte
<script lang="ts">
	import Splitter from '@tcpsystems/ui/foundation/Splitter';
</script>

<Splitter min={30} max={70} value={30} label="Resize service list between 30 and 70 percent">
	{#snippet start()}<p>Services · Studio, Acumen, Search</p>{/snippet}
	{#snippet end()}<p>Drag the divider or use arrow keys. Home and End reach the limits.</p>{/snippet}
</Splitter>

Disabled resizing

Studio · Rollout in progress

Pane resizing is unavailable during this rollout.

Disabled resizing.svelte
<script lang="ts">
	import Splitter from '@tcpsystems/ui/foundation/Splitter';
</script>

<Splitter aria-disabled="true" label="Deployment panes locked during rollout">
	{#snippet start()}<p>Studio · Rollout in progress</p>{/snippet}
	{#snippet end()}<p>Pane resizing is unavailable during this rollout.</p>{/snippet}
</Splitter>

API

Import
import Splitter from '@tcpsystems/ui/foundation/Splitter';
PropTypeDefault
label?string'Resize panes'
min?number20
max?number80
value?number50
orientation?'horizontal' | 'vertical''horizontal'
Snippet
start
end
HookKind
.tcp-splitterRoot class
data-orientationData attribute