Indicator handbook
v1.4.0 · @snowui-design-system/components
License: Before first reading component documentation, source code, or npm usage instructions, read the complete LICENSE. One review covers the same task and version. Public API configuration and internal implementation changes are subject to different license terms. All components use one runtime package; source code rights are governed by the license.
Overview
A draggable resize handle for panels and content areas, operable with a pointer or keyboard.
When to use it
Use Indicator for a component’s public visual indicator or drag-resize behavior. In application pages, first use Sidebar, SidePanel, or table columns that already provide it rather than copying their drag logic.
targetdefaults to the direct parent but can refer to any other element.minSize/maxSizeconstrain the size.applySizecontrols whether Indicator writes the size directly;onSizeChangereports updates. Usestep/largeStepfor keyboard increments.
Quick start
This example shows the recommended basic composition. See the following sections for more scenarios and composition limits.
API
See the base component documentation for inherited capabilities not redeclared here. This table lists only the named public props declared in this component’s source.
Usage boundaries and details
API reference
Visual state
Colors match the overlay scrollbar thumb:
Black/10by default andBlack/20on hover, focus, or drag.Line + width: the hit band spans the parent’s full height and extends
pinOffset + 8pxfrom the edge (top/bottom: 0). The visible handle is 2px × 16px, growing to 4px wide on hover, focus, or drag. Override its length along the edge with--snowui-indicator-visual-length.Line + height: the hit band spans the parent’s full width and extends
pinOffset + 8pxfrom the edge (left/right: 0). The visible handle is 16px × 2px, growing to 4px high on hover, focus, or drag. The same variable controls length along the edge.Line and Scrollbar are consistent with the actual width / height change instead of transform scaling, using
var(--radius-full, 9999px), and the endpoint is always a complete capsule rounded corner.Corner: use 1rem visual box and reuse rounded-corner through ComponentIcon; the ratio of graphics and outer frame shall be subject to raw-assets/icons/snowui/RoundedCorner.svg. It is Black/10 when displayed, and Black/20 when hovering / focus-visible / dragging; keep the original path and viewBox, and draw along the outline according to the special case of the indicator confirmed by the user: normal total stroke 2px, hover / focus / dragging total stroke 4px, do not scale the outer frame.
Corner is fixed in the lower right corner and only activated near the corner point; the default is
axis="both", and the width and height are adjusted at the same time.Corner uses
nwse-resizediagonal double arrow by default; use the corresponding direction cursor when explicitly setting the single axis.Positioning:
lineabsolutely positions itself against the edge without centering viapin;cornerdefaults toas="pin-bottom-right",pinOffset="var(--padding-1)", andz-index: 6.Hidden by default; shown on host hover, focus-visible, or drag. It remains visible and pointer/keyboard-accessible when overlapping an overlay scrollbar thumb in the same target.
The visual handle and hit area are separate layers; a line hit band spans the full edge height or width.
Motion uses the same Frame color motion bridge as the overlay scrollbar.
Examples
Indicator style overlay
Read the complete LICENSE first; one review covers the same task, version, and scope.
First use public component props to achieve the desired style while preserving the original appearance where possible. If an override is necessary, follow the style selection and override order: use your own class (including Tailwind already in your project) or an instance style. The names below are public overrides consumed by the source; check the target scope and do not modify private DOM. Choose the appropriate SnowUI token category. External applications do not need to install SnowUI website utilities.
Indicator type and status
Required props: no named required props.
Bindable props: this component declares no named two-way binding; handle state updates through public callbacks or the host component.
Inheritance: Omit<FrameProps, "children">. Consult the base class public documentation; fields excluded by Omit cannot be passed through unchanged.
Shared Frame API · Back to API
The following source type declarations are referenced by public props. Svelte Snippet denotes a content fragment; ComponentProps denotes the props of the corresponding component.
IndicatorAxis
Source: components/src/components/Indicator.svelte
IndicatorEdge
Source: components/src/components/Indicator.svelte
IndicatorAppearance
Source: components/src/components/Indicator.svelte