Skip to content
pixi-silk
GitHub repository
Interface

IslandOptions

import type { IslandOptions } from 'pixi-silk/ui/island';

Options of Island.

Properties#

PropertyTypeDescriptionDefined in
align?numberPlace 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?numberFill alpha. Default 1.packages/pixi-silk/src/ui/island/Island.ts:80
bleed?numberHow 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?ColorSourceFill colour. Default black, so the island reads as part of the bezel.packages/pixi-silk/src/ui/island/Island.ts:78
depth?numberOpen depth. Default: from items, else 96.packages/pixi-silk/src/ui/island/Island.ts:55
draggable?booleanPull and push it by dragging. Default true.packages/pixi-silk/src/ui/island/Island.ts:95
edge?IslandEdgeEdge it grows from. Default right.packages/pixi-silk/src/ui/island/Island.ts:36
flare?numberRadius of the concave flares where it meets the edge. Default 22.packages/pixi-silk/src/ui/island/Island.ts:74
gap?numberSpace between items. Default 16.packages/pixi-silk/src/ui/island/Island.ts:86
grab?numberExtra 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 | ColorSourceGrip line on the lip at rest. false hides it. Default white at 40%.packages/pixi-silk/src/ui/island/Island.ts:82
hintEvery?numberPlays 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?IslandHintWhat the timed hint plays. Default pulse.packages/pixi-silk/src/ui/island/Island.ts:115
hover?string | nullState 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?numberOpen length along the edge. Default: from items, else 240.packages/pixi-silk/src/ui/island/Island.ts:53
magnet?false | IslandMagnetThe 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?numberExtra shift along the edge, local units. Default 0.packages/pixi-silk/src/ui/island/Island.ts:51
padding?numberSpace around the items. Default 16.packages/pixi-silk/src/ui/island/Island.ts:88
peek?numberDepth 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?numberLength of that lip. Default 40% of the open length, at least 48.packages/pixi-silk/src/ui/island/Island.ts:59
radius?numberRadius of the far corners. Default 28.packages/pixi-silk/src/ui/island/Island.ts:72
rest?stringState it goes back to when closed. Default peek.packages/pixi-silk/src/ui/island/Island.ts:68
safeArea?IslandInsetsNotches 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?numberSquircle 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?stringFirst state. Default peek.packages/pixi-silk/src/ui/island/Island.ts:66
tapToClose?booleanTap on the island’s own surface while open closes it. Default true.packages/pixi-silk/src/ui/island/Island.ts:97
ticker?Ticker | nullnull to step it by hand with Island.tick. Default Ticker.shared.packages/pixi-silk/src/ui/island/Island.ts:123
viewport?IslandViewportWhat 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