Props And Modifiers
Props and modifiers are the styling and layout surface for Await widgets. The generated section below is sourced from runtime/types/prop.d.ts.
Usage
Component props describe the component's own value, such as TextValue.value, ImageValue.url, or ButtonValue.intent. Modifiers are shared styling and layout props from BaseMods, such as padding, background, fontSize, frame, foreground, and transition.
<Text
value='Hello'
fontSize={18}
fontWeight='semibold'
foreground='primary'
padding={8}
background='background'
/>Modifier order is semantic in Await. Later modifiers wrap earlier modifiers. For label, tag, or capsule-like blocks, write padding before background when the background should include the padding area.
Important Types
Color,RawColor, and gradient types define color-like values.BaseModsis the shared modifier surface.Modsallows base modifiers and suffixed variants such aspadding_name.Frame,Padding,Point,ScaleEffect, andRotationEffectare layout and transform helpers.NativeAnimation,Transition, andContentTransitiondescribe animation-related values.
Generated Type Declarations
CornerRadiusStyle
Source: runtime/types/prop.d.ts:1
type CornerRadiusStyle = "circular" | "continuous";NativeAnimation
Source: runtime/types/prop.d.ts:15
type NativeAnimation = (
| {
type?:
| "linear"
| "default"
| "easeIn"
| "easeInOut"
| "easeOut"
| "circularEaseIn"
| "circularEaseInOut"
| "circularEaseOut";
duration?: number;
}
| {
type: "interactiveSpring";
blendDuration?: number;
duration?: number;
bounce?: number;
}
| {
type: "bouncy";
bounce?: number;
duration?: number;
}
| {
type: "smooth";
duration?: number;
bounce?: number;
}
| {
type: "spring";
blendDuration?: number;
duration?: number;
bounce?: number;
}
| {
type: "timingCurve";
start: UnitPoint;
end: UnitPoint;
duration?: number;
}
| {
type: "snappy";
bounce?: number;
duration?: number;
}
) & {
value?: unknown;
delay?: number;
autoreverses?: boolean;
speed?: number;
loop?: boolean | number;
};Edge
Source: runtime/types/prop.d.ts:78
type Edge = "top" | "bottom" | "leading" | "trailing";Transition
Source: runtime/types/prop.d.ts:91
type Transition = RawTransition | [RawTransition, RawTransition];UnevenRoundedRectangleValue
Source: runtime/types/prop.d.ts:105
type UnevenRoundedRectangleValue = {
rectRadius?: {
topLeft?: Dimension;
topRight?: Dimension;
bottomRight?: Dimension;
bottomLeft?: Dimension;
bottom?: Dimension;
top?: Dimension;
left?: Dimension;
right?: Dimension;
};
style?: CornerRadiusStyle;
};ShapeValue
Source: runtime/types/prop.d.ts:119
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
Source: runtime/types/prop.d.ts:144
type RoundedRectangleValue = {
rectRadius?: Dimension;
style?: CornerRadiusStyle;
};VStackValue
Source: runtime/types/prop.d.ts:149
type VStackValue = {
spacing?: number;
alignment?: HorizontalAlignment;
};HStackValue
Source: runtime/types/prop.d.ts:154
type HStackValue = {
spacing?: number;
alignment?: VerticalAlignment;
};ZStackValue
Source: runtime/types/prop.d.ts:159
type ZStackValue = {
alignment?: Alignment;
};LinkValue
Source: runtime/types/prop.d.ts:163
type LinkValue = {
url?: string;
};ButtonValue
Source: runtime/types/prop.d.ts:167
type ButtonValue = {
intent?: IntentInfo;
fast?: boolean;
audio?: boolean;
url?: string;
};ColorValue
Source: runtime/types/prop.d.ts:174
type ColorValue = {
value?: Color;
};TextValue
Source: runtime/types/prop.d.ts:178
type TextValue = {
value?: Encodable;
};ImageValue
Source: runtime/types/prop.d.ts:182
type ImageValue = {
url?: string;
resizable?: Resizable;
interpolation?: Interpolation;
style?: TemplateRenderingMode;
};IconValue
Source: runtime/types/prop.d.ts:189
type IconValue = {
value?: string;
};TimeValueStrict
Source: runtime/types/prop.d.ts:193
type TimeValueStrict = {
value?: number;
style?: "time" | "date" | "relative" | "offset" | "timer";
};TimeValue
Source: runtime/types/prop.d.ts:198
type TimeValue = {
date?: Date;
style?: "time" | "date" | "relative" | "offset" | "timer";
};SvgValue
Source: runtime/types/prop.d.ts:203
type SvgValue = {
url?: string;
value?: string;
};CapsuleValue
Source: runtime/types/prop.d.ts:208
type CapsuleValue = {
style?: CornerRadiusStyle;
};SectorValue
Source: runtime/types/prop.d.ts:212
type SectorValue = {
value: [start: number, end: number];
};PolygonValue
Source: runtime/types/prop.d.ts:216
type PolygonValue = {
value: Array<[x: number, y: number]>;
};SpacerValue
Source: runtime/types/prop.d.ts:220
type SpacerValue = {
minLength?: number;
};RadialGradient
Source: runtime/types/prop.d.ts:224
type RadialGradient = {
gradient: "radial";
colors?: Color[];
stops?: Array<[Color, number]>;
startRadius?: number;
endRadius?: number;
};AngularGradient
Source: runtime/types/prop.d.ts:232
type AngularGradient = {
gradient: "angular";
colors?: Color[];
stops?: Array<[Color, number]>;
angle?: number;
center?: UnitPoint;
};LinearGradient
Source: runtime/types/prop.d.ts:240
type LinearGradient = {
gradient: "linear";
colors?: Color[];
stops?: Stop[];
startPoint?: UnitPoint;
endPoint?: UnitPoint;
};Stop
Source: runtime/types/prop.d.ts:261
type Stop = [Color, number];RawThemeColor
Source: runtime/types/prop.d.ts:287
type RawThemeColor = RawColor | [RawColor, number];Dimension
Source: runtime/types/prop.d.ts:327
type Dimension = "max" | number;LooseValues
Source: runtime/types/prop.d.ts:333
type LooseValues = {
[P in keyof (ButtonValue &
HStackValue &
VStackValue &
ZStackValue &
ColorValue &
ImageValue &
LinkValue &
SpacerValue &
SvgValue &
IconValue &
TextValue &
TimeValueStrict &
CapsuleValue &
RoundedRectangleValue &
SectorValue &
ShapeValue &
UnevenRoundedRectangleValue)]?: unknown;
};Props
Source: runtime/types/prop.d.ts:353
type Props = ID & Mods & LooseValues & { children?: NativeView };ID
Source: runtime/types/prop.d.ts:354
type ID = { id?: Encodable };TextAlignment
Source: runtime/types/prop.d.ts:355
type TextAlignment = "center" | "leading" | "trailing";FontDesign
Source: runtime/types/prop.d.ts:356
type FontDesign = "monospaced" | "rounded" | "serif" | "default";Material
Source: runtime/types/prop.d.ts:377
type Material = "regular" | "thin" | "thick" | "ultraThin" | "ultraThick";FontWidth
Source: runtime/types/prop.d.ts:378
type FontWidth = "compressed" | "condensed" | "standard" | "expanded" | number;Interpolation
Source: runtime/types/prop.d.ts:379
type Interpolation = "none" | "low" | "medium" | "high";Resizable
Source: runtime/types/prop.d.ts:380
type Resizable = boolean | "stretch" | "tile";Point
Source: runtime/types/prop.d.ts:382
type Point = { x?: number; y?: number } | number;Font
Source: runtime/types/prop.d.ts:387
type Font = {
name: string;
size: number;
wght?: number;
wdth?: number;
opsz?: number;
slnt?: number;
ital?: number;
GRAD?: number;
HGHT?: number;
SOFT?: number;
monospacedDigit?: boolean;
features?: string[] | string;
};Rotation3DEffect
Source: runtime/types/prop.d.ts:403
type Rotation3DEffect = {
angle: number;
x?: number;
y?: number;
z?: number;
anchor?: UnitPoint;
anchorZ?: number;
perspective?: number;
};RotationEffect
Source: runtime/types/prop.d.ts:412
type RotationEffect = { angle: number; anchor: UnitPoint } | number;Shadow
Source: runtime/types/prop.d.ts:417
type Shadow = {
color?: Color;
x?: number;
y?: number;
blur?: number;
};Pattern
Source: runtime/types/prop.d.ts:423
type Pattern = "dash" | "dashDot" | "dashDotDot" | "dot" | "solid";CustomButtonStyle
Source: runtime/types/prop.d.ts:455
type CustomButtonStyle = {
press: NativeView;
normal: NativeView;
};Duration
Source: runtime/types/prop.d.ts:460
type Duration = 2 | 4 | 6 | 10 | 12 | 20 | 30 | 60;GifValue
Source: runtime/types/prop.d.ts:461
type GifValue = { size: Size; duration: Duration };BaseMods
Source: runtime/types/prop.d.ts:471
type BaseMods = {
animation?: NativeAnimation | number | "";
aspectRatio?: AspectRatio;
background?:
| ShapeStyle
| NativeView
| { alignment: Alignment; content: NativeView };
baselineOffset?: number;
blendMode?: BlendMode;
blur?: number | { blur: number; opaque: boolean };
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?: boolean | { horizontal?: boolean; vertical?: boolean };
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;
lineLimit?: number | "";
lineSpacing?: number;
lineHeight?: LineHeight | "";
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;
reverseMask?: NativeView;
rotation3DEffect?: Rotation3DEffect;
rotationEffect?: RotationEffect;
saturation?: number;
scaleEffect?: ScaleEffect;
shadow?: Shadow;
sides?: number;
strikethrough?: boolean | { isActive?: boolean; color?: Color };
test?: unknown;
textAlignment?: TextAlignment;
tint?: ShapeStyle;
tracking?: number;
transform?: [number, number, number, number, number, number];
transition?: Transition;
truncationMode?: "head" | "middle" | "tail";
underline?:
| boolean
| { isActive?: boolean; pattern?: Pattern; color?: Color };
width?: number;
zIndex?: number;
};Mods
Source: runtime/types/prop.d.ts:556
type Mods = {
[K in keyof BaseMods]?: BaseMods[K];
} & {
[K in keyof BaseMods as `${K & string}_${string}`]?: BaseMods[K];
};ObjectToTuple
Source: runtime/types/prop.d.ts:562
type ObjectToTuple<T> = {
[K in keyof T]: [K, T[K]];
}[keyof T];ModTuple
Source: runtime/types/prop.d.ts:566
type ModTuple = ObjectToTuple<BaseMods>;