Modifiers are chainable methods on a component builder. Each modifier returns a new builder with one additional modifier wrapping the inner subtree, and the renderer applies the chain in order. CallingDocumentation Index
Fetch the complete documentation index at: https://docs.metabind.ai/llms.txt
Use this file to discover all available pages before exploring further.
.padding(16) on a Text does not mutate the text — it produces a new builder that the next call can chain from. The result is that styling, layout, and behavior all read top-to-bottom on a single component, and the component itself stays a function call with its bare arguments.
This page covers the chainable pattern, why ordering matters, and how the modifier surface is organized in the reference.
The chainable pattern
Every component supports the same universal modifier set. Calls return the builder, so you can chain as many as you need:font is applied first, then foregroundStyle, then padding. The renderer walks that wrapper chain when it produces native output, so what you write is the order the renderer applies.
A few practical consequences:
- Modifiers compose across components. The same
.padding(16)works on aText, aVStack, anImage, aButton. - Modifiers can carry components themselves.
.background(Color("red"))and.overlay(Text("Badge"))accept other components as their content, which lets the chain stay flat instead of nesting wrappers in the tree. - Some modifiers only take effect on specific component types. The chain still type-checks, but the rendered effect is scoped to where it makes sense — see Component-specific modifiers below.
Order matters
Modifiers apply left to right. Reordering changes what you see, because each modifier wraps the result of the chain so far. The classic case is.padding and .background:
.padding(8) runs first and produces a padded text node; .background then paints the entire padded area red. In the second, .background paints the bare text node; .padding(8) then adds whitespace around the colored block.
The same logic applies anywhere a modifier wraps geometry — .frame, .cornerRadius, .clipped, .overlay, .shadow, transform modifiers. When a chain is not producing what you expect, the order is usually the answer.
Every conforming BindJS runtime preserves the author’s order through to the renderer. You can rely on A.then(B) rendering the same way on every platform.
Categories
The modifier surface is organized by what each modifier affects. The reference splits the catalog into consolidated pages — use the table to jump to the right section.| Category | What it does | Reference |
|---|---|---|
| Identity and lifecycle | .id, .tag, .onAppear, .onDisappear | Identity and lifecycle |
| Layout — frame and padding | .frame, .padding, .offset, .zIndex, sizing | Layout — frame and padding |
| Transforms | .scaleEffect, .rotationEffect, .transformEffect | Transforms |
| Appearance — color and style | .foregroundStyle, .background, .cornerRadius, .shadow | Appearance — color and style |
| Appearance — effects | .blur, .saturation, .brightness, .blendMode | Appearance — effects |
| Typography | .font, .fontWeight, .bold, .italic, .lineLimit | Typography |
| Layering — overlay | .overlay | overlay |
| Clipping and masking | .clipped, .clipShape, .mask | Clipping and masking |
| Visibility and interaction | .hidden, .disabled, .allowsHitTesting, .textSelection | Visibility and interaction |
| Gestures | .onTapGesture, .onDragGesture, .onLongPressGesture, .onHover | Gestures |
| Visual effects | .visualEffect, .coordinateSpace | Visual effects |
| Controls | .controlSize, .pickerStyle, .buttonStyle | Controls |
| Text input | .keyboardType, .textFieldStyle, .submitLabel, .focused | Text input |
| Value observation | .onChange | onChange |
| Accessibility | .accessibilityLabel, .accessibilityValue, .accessibilityHidden | Accessibility |
| Transitions | .transition | transition |
| Environment | .environment(key, value) | environment |
.sheet, .fullScreenCover, .presentationDetents), Navigation chrome, Toolbar, List chrome, Scroll chrome, Grid cells, Accessibility refinements, and Text refinements. Reading these from a cross-platform component requires a fallback.
Component-specific modifiers
A handful of modifiers are only valid on specific component types. The chain still type-checks because the modifier is declared on the corresponding component interface, but the rendered effect is scoped:.font(...),.bold(),.italic(), and the rest of typography apply toText..resizable(),.renderingMode(...),.interpolation(...)apply toImage..fill(...)and.stroke(...)apply to shapes (Circle,Rectangle,RoundedRectangle,Ellipse,Capsule,Path).
Text.
Animation
Animation is a thin layer on top of the modifier chain.withAnimation(animation?, body) wraps a state mutation in an animation context, and any modifier whose value changes as a result of that mutation animates between the old and new values.
Spring, EaseIn, EaseOut, Linear, Bouncy, and the rest. Omit it for the default spring. See withAnimation for the wrapping function and Animation builders for the catalog of timing curves.
What to read next
Layout — frame and padding
The geometric modifiers most chains start with.
Typography
The text-shaping modifiers
Text accepts.Gestures
Tap, drag, long press, and hover handlers.
State and environment
How
useState, useStore, and environment values move through a render.