Resizable
A Liquid Glass multi-panel resizable layout with neutral content panes, concentric corners, capsule grabbers, and accessible opaque fallbacks.
A Liquid Glass resizable panel group that keeps content panes neutral without stacking nested chrome: the outer frame uses a concentric rounded-2xl translucent surface (with variant="nested" for inner groups), handles support regular and prominent capsule grabbers, and reduced-transparency, forced-colors, or material="opaque" settings cleanly fall back to solid contrast-preserving fills.
Preview
Section titled “Preview”<div
class="w-full max-w-lg rounded-2xl bg-gradient-to-br from-sky-500/20 via-indigo-500/15 to-fuchsia-500/20 p-6"
>
<proto-ui-liquid-glass-resizable-root
id="liquid-glass-resizable-hero"
class="h-56 w-full"
>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">One</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
<proto-ui-liquid-glass-resizable-handle></proto-ui-liquid-glass-resizable-handle>
<proto-ui-liquid-glass-resizable-panel>
<proto-ui-liquid-glass-resizable-root
id="liquid-glass-resizable-nested"
class="h-full w-full min-h-0"
>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">Two</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
<proto-ui-liquid-glass-resizable-handle></proto-ui-liquid-glass-resizable-handle>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">Three</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
</proto-ui-liquid-glass-resizable-root>
</proto-ui-liquid-glass-resizable-panel>
</proto-ui-liquid-glass-resizable-root>
</div>
<script type="module">
import { setElementProps } from '@proto.ui/adapter-web-component';
const root = document.querySelector(
'#liquid-glass-resizable-hero'
);
const nestedRoot = document.querySelector(
'#liquid-glass-resizable-nested'
);
setElementProps(root, {
defaultSizes: [50, 50],
constraints: [
{ min: 20, max: 75, collapsible: true },
{ min: 25 },
],
});
setElementProps(nestedRoot, {
orientation: 'vertical',
defaultSizes: [25, 75],
constraints: [{ min: 20 }, { min: 25 }],
variant: 'nested',
});
root
.querySelectorAll(
':scope > proto-ui-liquid-glass-resizable-panel'
)
.forEach((panel, index) => setElementProps(panel, { index }));
setElementProps(
root.querySelector(
':scope > proto-ui-liquid-glass-resizable-handle'
),
{ index: 0, withHandle: true }
);
nestedRoot
.querySelectorAll(
':scope > proto-ui-liquid-glass-resizable-panel'
)
.forEach((panel, index) => setElementProps(panel, { index }));
setElementProps(
nestedRoot.querySelector(
':scope > proto-ui-liquid-glass-resizable-handle'
),
{ index: 0, withHandle: true }
);
</script>Installation
Section titled “Installation”Available starting in 0.3.0-rc.1 and later releases. Import the prototypes directly from @proto.ui/prototypes-liquid-glass/resizable and adapt them for your target runtime:
import { resizableRoot, resizablePanel, resizableHandle,} from '@proto.ui/prototypes-liquid-glass/resizable';import { LiquidGlassResizableRoot, LiquidGlassResizablePanel, LiquidGlassResizableHandle,} from '../proto-ui/components/react';
export function Example() { return ( <div className="w-full max-w-lg rounded-2xl bg-gradient-to-br from-sky-500/20 via-indigo-500/15 to-fuchsia-500/20 p-6"> <LiquidGlassResizableRoot defaultSizes={[50, 50]} className="h-56 w-full"> <LiquidGlassResizablePanel index={0}>One</LiquidGlassResizablePanel> <LiquidGlassResizableHandle index={0} withHandle /> <LiquidGlassResizablePanel index={1}>Two</LiquidGlassResizablePanel> </LiquidGlassResizableRoot> </div> );}Composition
Section titled “Composition”LiquidGlassResizableRoot (variant="default" | "nested", material="auto" | "opaque")├── LiquidGlassResizablePanel (index: 0)├── LiquidGlassResizableHandle (index: 0, withHandle?, prominence?, material?)└── LiquidGlassResizablePanel (index: 1)- Hierarchy & concentric geometry: content panels stay neutral while the outer
Rootsupplies arounded-2xlshell. Passvariant="nested"on inner split groups to prevent stacked frames; enablewithHandleonHandleto display a centeredrounded-fullcapsule grabber. - Accessible fallbacks:
material="auto"enables translucent layering only when reduced-transparency and forced-colors preferences are inactive; passingmaterial="opaque"forces solid fills. Disabled handles preserve opaque legibility without dimming the surface withopacity. - Multi-panel, constraints & keyboard: supports
sizes/defaultSizes, per-panelconstraints, pointer drag, arrow keys,Shiftacceleration,Home/End, andEntercollapsing, withResize panelsas the default handle label.
Examples
Section titled “Examples”Vertical
Section titled “Vertical”Use orientation="vertical" for vertically stacked resizable panels.
<div
class="w-full max-w-lg rounded-2xl bg-gradient-to-br from-sky-500/20 via-indigo-500/15 to-fuchsia-500/20 p-6"
>
<proto-ui-liquid-glass-resizable-root
id="liquid-glass-resizable-vertical"
class="h-56 w-full"
>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">Header</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
<proto-ui-liquid-glass-resizable-handle></proto-ui-liquid-glass-resizable-handle>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">Content</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
</proto-ui-liquid-glass-resizable-root>
</div>
<script type="module">
import { setElementProps } from '@proto.ui/adapter-web-component';
const root = document.querySelector(
'#liquid-glass-resizable-vertical'
);
setElementProps(root, {
orientation: 'vertical',
defaultSizes: [25, 75],
constraints: [{ min: 20 }, { min: 25 }],
});
root
.querySelectorAll('proto-ui-liquid-glass-resizable-panel')
.forEach((panel, index) => setElementProps(panel, { index }));
setElementProps(
root.querySelector('proto-ui-liquid-glass-resizable-handle'),
{ index: 0 }
);
</script>Handle & Prominence
Section titled “Handle & Prominence”The top group compares prominence="regular" and prominence="prominent" capsule grabbers; the bottom group shows the default hairline separator.
<div
class="w-full max-w-lg rounded-2xl bg-gradient-to-br from-sky-500/20 via-indigo-500/15 to-fuchsia-500/20 p-6"
>
<div class="flex w-full max-w-md flex-col gap-4">
<proto-ui-liquid-glass-resizable-root
id="liquid-glass-resizable-with-handle"
class="h-40 w-full"
>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">Sidebar</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
<proto-ui-liquid-glass-resizable-handle></proto-ui-liquid-glass-resizable-handle>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">Content</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
<proto-ui-liquid-glass-resizable-handle></proto-ui-liquid-glass-resizable-handle>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">Details</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
</proto-ui-liquid-glass-resizable-root>
<proto-ui-liquid-glass-resizable-root
id="liquid-glass-resizable-hairline"
class="h-32 w-full"
>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">Left</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
<proto-ui-liquid-glass-resizable-handle></proto-ui-liquid-glass-resizable-handle>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">Right</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
</proto-ui-liquid-glass-resizable-root>
</div>
</div>
<script type="module">
import { setElementProps } from '@proto.ui/adapter-web-component';
const withGrip = document.querySelector(
'#liquid-glass-resizable-with-handle'
);
setElementProps(withGrip, {
defaultSizes: [25, 50, 25],
constraints: [{ min: 15 }, { min: 30 }, { min: 15 }],
});
withGrip
.querySelectorAll('proto-ui-liquid-glass-resizable-panel')
.forEach((panel, index) => setElementProps(panel, { index }));
withGrip
.querySelectorAll('proto-ui-liquid-glass-resizable-handle')
.forEach((handle, index) =>
setElementProps(handle, {
index,
withHandle: true,
prominence: index === 1 ? 'prominent' : 'regular',
})
);
const hairline = document.querySelector(
'#liquid-glass-resizable-hairline'
);
setElementProps(hairline, {
defaultSizes: [50, 50],
constraints: [{ min: 20 }, { min: 20 }],
});
hairline
.querySelectorAll('proto-ui-liquid-glass-resizable-panel')
.forEach((panel, index) => setElementProps(panel, { index }));
setElementProps(
hairline.querySelector(
'proto-ui-liquid-glass-resizable-handle'
),
{ index: 0, withHandle: false }
);
</script>Pass direction="rtl" to mirror panel order and horizontal arrow-key behavior.
<div
class="w-full max-w-lg rounded-2xl bg-gradient-to-br from-sky-500/20 via-indigo-500/15 to-fuchsia-500/20 p-6"
>
<proto-ui-liquid-glass-resizable-root
id="liquid-glass-resizable-rtl"
class="h-56 w-full"
>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">واحد</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
<proto-ui-liquid-glass-resizable-handle></proto-ui-liquid-glass-resizable-handle>
<proto-ui-liquid-glass-resizable-panel>
<proto-ui-liquid-glass-resizable-root
id="liquid-glass-resizable-rtl-nested"
class="h-full w-full min-h-0"
>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">اثنان</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
<proto-ui-liquid-glass-resizable-handle></proto-ui-liquid-glass-resizable-handle>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">ثلاثة</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
</proto-ui-liquid-glass-resizable-root>
</proto-ui-liquid-glass-resizable-panel>
</proto-ui-liquid-glass-resizable-root>
</div>
<script type="module">
import { setElementProps } from '@proto.ui/adapter-web-component';
const root = document.querySelector(
'#liquid-glass-resizable-rtl'
);
const nestedRoot = document.querySelector(
'#liquid-glass-resizable-rtl-nested'
);
setElementProps(root, {
direction: 'rtl',
defaultSizes: [50, 50],
constraints: [{ min: 20 }, { min: 20 }],
});
setElementProps(nestedRoot, {
orientation: 'vertical',
direction: 'rtl',
defaultSizes: [25, 75],
constraints: [{ min: 20 }, { min: 25 }],
variant: 'nested',
});
root
.querySelectorAll(
':scope > proto-ui-liquid-glass-resizable-panel'
)
.forEach((panel, index) => setElementProps(panel, { index }));
setElementProps(
root.querySelector(
':scope > proto-ui-liquid-glass-resizable-handle'
),
{ index: 0, withHandle: true }
);
nestedRoot
.querySelectorAll(
':scope > proto-ui-liquid-glass-resizable-panel'
)
.forEach((panel, index) => setElementProps(panel, { index }));
setElementProps(
nestedRoot.querySelector(
':scope > proto-ui-liquid-glass-resizable-handle'
),
{ index: 0, withHandle: true }
);
</script>Multi-panel & Collapsible
Section titled “Multi-panel & Collapsible”Combine three panels with a collapsible sidebar. Focus the first handle and press Enter to toggle collapse.
<div
class="w-full max-w-2xl rounded-2xl bg-gradient-to-br from-sky-500/20 via-indigo-500/15 to-fuchsia-500/20 p-6"
>
<proto-ui-liquid-glass-resizable-root
id="liquid-glass-resizable-collapsible"
class="h-56 w-full"
>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">Sidebar</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
<proto-ui-liquid-glass-resizable-handle></proto-ui-liquid-glass-resizable-handle>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">Editor</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
<proto-ui-liquid-glass-resizable-handle></proto-ui-liquid-glass-resizable-handle>
<proto-ui-liquid-glass-resizable-panel>
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold text-sm">Inspector</span>
</div>
</proto-ui-liquid-glass-resizable-panel>
</proto-ui-liquid-glass-resizable-root>
</div>
<script type="module">
import { setElementProps } from '@proto.ui/adapter-web-component';
const root = document.querySelector(
'#liquid-glass-resizable-collapsible'
);
setElementProps(root, {
defaultSizes: [25, 50, 25],
constraints: [
{ min: 15, max: 35, collapsible: true },
{ min: 30 },
{ min: 15, max: 35 },
],
});
root
.querySelectorAll('proto-ui-liquid-glass-resizable-panel')
.forEach((panel, index) => setElementProps(panel, { index }));
root
.querySelectorAll('proto-ui-liquid-glass-resizable-handle')
.forEach((handle, index) =>
setElementProps(handle, { index, withHandle: true })
);
</script>| Prop | Type | Default |
|---|---|---|
variant | 'default' 'nested' | 'default' |
material | 'auto' 'opaque' | 'auto' |
sizes | readonly number[] | — |
defaultSizes | readonly number[] | — |
constraints | readonly ResizablePanelConstraint[] | [] |
value | number | — |
defaultValue | number | 50 |
min | number | 10 |
max | number | 90 |
step | number | 1 |
collapsible | boolean | false |
disabled | boolean | false |
readOnly | boolean | false |
orientation | 'horizontal' 'vertical' | 'horizontal' |
direction | 'ltr' 'rtl' | 'ltr' |
Panel & Handle
Section titled “Panel & Handle”| Prop | Type | Default |
|---|---|---|
Panel.index | number | 0 |
Handle.index | number | 0 |
Handle.withHandle | boolean | false |
Handle.prominence | 'regular' 'prominent' | 'regular' |
Handle.material | 'auto' 'opaque' | 'auto' |
- Exposed states: Root exposes
valueandsizes; Panel exposessize; Handle exposesvalue,focusVisible, anddisabled. - Events & methods: Root emits
sizesChange,sizesCommit,valueChange, andvalueCommit, and exposesrequestResize(index, next, commit?),requestSizes(next, commit?),requestValue(next, commit?), andcancelResize().