IslandOptions
import type { IslandOptions } from 'pixi-silk/ui/island';
Options of Island.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
align? | number | Place along the edge: 0 at the start (top or left), 1 at the end. Default 0.5. | packages/pixi-silk/src/ui/island/Island.ts:49 |
alpha? | number | Fill alpha. Default 1. | packages/pixi-silk/src/ui/island/Island.ts:80 |
bleed? | number | How far the body reaches past the edge line, local units, so the join with a bezel shows no seam. Use 0 for an island inside an object such as a card, or a sliver shows past its edge. Default 1. | packages/pixi-silk/src/ui/island/Island.ts:121 |
color? | ColorSource | Fill colour. Default black, so the island reads as part of the bezel. | packages/pixi-silk/src/ui/island/Island.ts:78 |
depth? | number | Open depth. Default: from items, else 96. | packages/pixi-silk/src/ui/island/Island.ts:55 |
draggable? | boolean | Pull and push it by dragging. Default true. | packages/pixi-silk/src/ui/island/Island.ts:95 |
edge? | IslandEdge | Edge it grows from. Default right. | packages/pixi-silk/src/ui/island/Island.ts:36 |
flare? | number | Radius of the concave flares where it meets the edge. Default 22. | packages/pixi-silk/src/ui/island/Island.ts:74 |
gap? | number | Space between items. Default 16. | packages/pixi-silk/src/ui/island/Island.ts:86 |
grab? | number | Extra room around the lip that takes touches, local units. A finger misses a 12-unit lip, so the zone reaches this far past it along the edge and into the viewport. It takes input only at rest. 0 turns it off. Default 24. | packages/pixi-silk/src/ui/island/Island.ts:105 |
grip? | boolean | ColorSource | Grip line on the lip at rest. false hides it. Default white at 40%. | packages/pixi-silk/src/ui/island/Island.ts:82 |
hintEvery? | number | Plays Island.hint every this many ms at rest, until it is first opened. 0 turns it off. Default 0. | packages/pixi-silk/src/ui/island/Island.ts:113 |
hintKind? | IslandHint | What the timed hint plays. Default pulse. | packages/pixi-silk/src/ui/island/Island.ts:115 |
hover? | string | null | State it shows while hovered at rest, such as compact. Default none. | packages/pixi-silk/src/ui/island/Island.ts:70 |
items? | Container<ContainerChild>[] | Content for the open state, stacked along the edge. Ignored when views.open is set. | packages/pixi-silk/src/ui/island/Island.ts:84 |
length? | number | Open length along the edge. Default: from items, else 240. | packages/pixi-silk/src/ui/island/Island.ts:53 |
magnet? | false | IslandMagnet | The lip leans toward a pointer near it at rest: it grows by depth and slides up to slide along the edge. On touch it follows the finger that lands near the edge, then lets go. false turns it off. Default { radius: 120, depth: 8, slide: 14 }. | packages/pixi-silk/src/ui/island/Island.ts:111 |
offset? | number | Extra shift along the edge, local units. Default 0. | packages/pixi-silk/src/ui/island/Island.ts:51 |
padding? | number | Space around the items. Default 16. | packages/pixi-silk/src/ui/island/Island.ts:88 |
peek? | number | Depth of the lip left showing at rest, the edge you pull it out by. 0 hides it. Default 12. | packages/pixi-silk/src/ui/island/Island.ts:57 |
peekLength? | number | Length of that lip. Default 40% of the open length, at least 48. | packages/pixi-silk/src/ui/island/Island.ts:59 |
radius? | number | Radius of the far corners. Default 28. | packages/pixi-silk/src/ui/island/Island.ts:72 |
rest? | string | State it goes back to when closed. Default peek. | packages/pixi-silk/src/ui/island/Island.ts:68 |
safeArea? | IslandInsets | Notches and rounded screen corners. The island still grows from the true edge, but its content clears the inset on that edge, and it stays between the insets at the ends. | packages/pixi-silk/src/ui/island/Island.ts:47 |
sizes? | Record<string, IslandSize> | More states, or other sizes for hidden, peek and open. A notch adds compact between its lip and its panel, for example. Dragging stops at every state. | packages/pixi-silk/src/ui/island/Island.ts:64 |
smoothing? | number | Squircle smoothing of the far corners, 0..1. Default 0.6. | packages/pixi-silk/src/ui/island/Island.ts:76 |
spring? | { damping?: number; stiffness?: number; } | Spring of the depth. Default 300 stiffness, 26 damping: a small bounce. | packages/pixi-silk/src/ui/island/Island.ts:99 |
spring.damping? | number | - | packages/pixi-silk/src/ui/island/Island.ts:99 |
spring.stiffness? | number | - | packages/pixi-silk/src/ui/island/Island.ts:99 |
state? | string | First state. Default peek. | packages/pixi-silk/src/ui/island/Island.ts:66 |
tapToClose? | boolean | Tap on the island’s own surface while open closes it. Default true. | packages/pixi-silk/src/ui/island/Island.ts:97 |
ticker? | Ticker | null | null to step it by hand with Island.tick. Default Ticker.shared. | packages/pixi-silk/src/ui/island/Island.ts:123 |
viewport? | IslandViewport | What it sits on. An Application is followed on resize. A signal of a rectangle, such as IslandFrame.inner, is followed on change. A plain rectangle in the parent’s space puts it on the side of a panel. Without one the island draws nothing until Island.setViewport. | packages/pixi-silk/src/ui/island/Island.ts:42 |
views? | Record<string, Container<ContainerChild>> | Content per state. Each view is laid out in the box its state’s size gives (see Island.boxOf), anchored to the far side, and fades in as the island reaches that state. | packages/pixi-silk/src/ui/island/Island.ts:93 |