Prop
The generated section below is sourced from runtime/types/prop.d.ts.
Generated Type Declarations
Props
ts
type Props = Record<string, unknown>;VStackValue
spacingDefault 0.alignmentHorizontal alignment for child views.
ts
type VStackValue = {
spacing?: number;
alignment?: HorizontalAlignment;
};HStackValue
spacingDefault 0.alignmentVertical alignment for child views.
ts
type HStackValue = {
spacing?: number;
alignment?: VerticalAlignment;
};ZStackValue
alignmentHorizontal and vertical alignment for child views.
ts
type ZStackValue = {
alignment?: Alignment;
};ButtonValue
intentIntent returned byAwait.define(...), used to run a registered widget intent when the button is tapped.fastOnly applies in the app; triggers the button as soon as the touch begins.audioRequests permission to play audio.urlOpens a universal link directly, such ashttps://github.com/await-widget/skills.
ts
type ButtonValue = {
intent?: IntentInfo;
fast?: boolean;
audio?: boolean;
url?: string;
};ShapeValue
fillDefault black on light theme, white on dark theme.strokeOnly centered strokes are supported.
ts
type ShapeValue = {
fill?: ShapeStyle;
stroke?: {
color?: Color;
lineWidth?: number;
lineCap?: string;
lineJoin?: string;
miterLimit?: number;
dash?: number[];
dashPhase?: number;
};
shape?: {
trim?: [number, number];
rotation?: RotationEffect;
offset?: Point;
scale?: ScaleEffect;
in?: {
x: number;
y: number;
width: number;
height: number;
};
};
};RoundedRectangleValue
styleDefaultcontinuous.
ts
type RoundedRectangleValue = {
rectRadius?: Dimension;
style?: CornerRadiusStyle;
};UnevenRoundedRectangleValue
ts
type UnevenRoundedRectangleValue = {
rectRadius?: {
topLeft?: Dimension;
topRight?: Dimension;
bottomRight?: Dimension;
bottomLeft?: Dimension;
bottom?: Dimension;
top?: Dimension;
left?: Dimension;
right?: Dimension;
};
style?: CornerRadiusStyle;
};CapsuleValue
ts
type CapsuleValue = {
style?: CornerRadiusStyle;
};SectorValue
ts
type SectorValue = {
value: [start: number, end: number];
};PolygonValue
ts
type PolygonValue = {
value: Array<[x: number, y: number]>;
};LinkValue
ts
type LinkValue = {
url?: string;
};ColorValue
ts
type ColorValue = {
value?: Color;
};TextValue
valueText or encodable value rendered by the component.
ts
type TextValue = {
value?: Encodable;
};ImageValue
urlLocal or remote path such asimg.pngpath/img.pnghttps://example.com/img.pngresizableThe modes used to resize an image to fit within its containing view.interpolationThe level of quality for rendering an image that requires interpolation, such as a scaled image.styleA type that indicates how images are rendered
ts
type ImageValue = {
url?: string;
resizable?: Resizable;
interpolation?: Interpolation;
style?: TemplateRenderingMode;
};IconValue
valueThe name of the system symbol image. Use the SF Symbols app to look up the names of system symbol images.
ts
type IconValue = {
value?: string;
};TimeValue
styleUsetimerto update once per second.
ts
type TimeValue = {
date?: Date;
style?: TimeStyle;
};ProgressViewValue
countsDownDefault true. Only applies when value is a date range.
ts
type ProgressViewValue = {
value: number | [start: Date, end: Date];
countsDown?: boolean;
};SvgValue
urlFor example,img.png,path/img.png, orhttps://example.com/img.png.valueFor example,<svg><path d="M0 0h10v10h-10z"/></svg>.
ts
type SvgValue = {
url?: string;
value?: string;
};SpacerValue
ts
type SpacerValue = {
minLength?: number;
};GifValue
ts
type GifValue = {
size: Size;
duration: GifDuration;
};TickerValue
ts
type TickerValue = {
size: Size;
style: TickerStyle;
};FlipValue
ts
type FlipValue = {
index: number;
delta: number;
curr: NativeView;
prev: NativeView;
perspective?: number;
shadowOpacity?: number;
leadingHidden?: boolean;
trailingHidden?: boolean;
};Mods
ts
type Mods = {
[K in keyof BaseMods]?: BaseMods[K];
} & {
[K in keyof BaseMods as `${K & string}_${string}`]?: BaseMods[K];
};BaseMods
ts
type BaseMods = {
animation?: NativeAnimation | number | '';
aspectRatio?: AspectRatio;
background?:
| ShapeStyle
| NativeView
| {alignment: Alignment; content: NativeView};
baselineOffset?: number;
blendMode?: BlendMode;
blur?: Blur;
brightness?: number;
buttonStyle?: ButtonStyle;
clipped?: boolean;
clipShape?: NativeView | '';
colorInvert?: boolean;
colorMultiply?: Color;
compositingGroup?: boolean;
contentShape?: NativeView | '';
contentTransition?: ContentTransition;
contrast?: number;
cornerRadius?: number;
debug?: boolean;
disable?: boolean;
drawingGroup?: boolean;
fixedSize?: FixedSize;
font?: Font | '';
fontDesign?: FontDesign | '';
fontSize?: number;
fontWeight?: FontWeight | '';
fontWidth?: FontWidth | '';
foreground?: ShapeStyle;
frame?: Frame;
geometryGroup?: boolean;
grayscale?: number;
height?: number;
hidden?: boolean;
hueRotation?: number;
ignoresSafeArea?: boolean;
italic?: boolean;
kerning?: number;
layoutPriority?: number;
lineHeight?: LineHeight | '';
lineLimit?: number | '';
lineSpacing?: number;
luminanceToAlpha?: boolean;
mask?: NativeView;
maxHeight?: Dimension | boolean;
maxSides?: Dimension | boolean;
maxWidth?: Dimension | boolean;
minimumScaleFactor?: number;
monospaced?: boolean;
monospacedDigit?: boolean;
offset?: Point;
offsetX?: number;
offsetY?: number;
opacity?: number;
overlay?:
| ShapeStyle
| NativeView
| {alignment: Alignment; content: NativeView};
padding?: Padding | boolean;
pixelPerfectCenter?: boolean | Point;
position?: Point;
progressViewStyle?: ProgressViewStyle;
reverseMask?: NativeView;
rotation3DEffect?: Rotation3DEffect;
rotationEffect?: RotationEffect;
saturation?: number;
scaleEffect?: ScaleEffect;
shadow?: Shadow;
sides?: number;
strikethrough?:
| boolean
| {isActive?: boolean; pattern?: Pattern; color?: Color};
test?: unknown;
textAlignment?: TextAlignment;
tint?: ShapeStyle;
tracking?: number;
transform?: [number, number, number, number, number, number];
transition?: Transition;
truncationMode?: 'head' | 'middle' | 'tail';
typesettingLanguage?: string;
underline?: boolean | {isActive?: boolean; pattern?: Pattern; color?: Color};
width?: number;
zIndex?: number;
};