NativeScript 9.1 Released → V8 14.9, Vite 8 HMR, built for rapid agentic visual iteration
Dig in

<Placeholder> allows adding native views directly in your markup without creating a full View wrapper for it. When NativeScript is constructing the UI and encounters a Placeholder element, it emits a creatingView event, allowing you to pass in any native view to be rendered by assigning it to the args.view parameter.

Props ​

...Inherited ​

For additional inherited properties, refer to the API Reference.

Events ​

creatingView ​

ts
on('creatingView', (args: CreateViewEventData) => {
  const placeholder = args.object as Placeholder
  args.view = someNativeView
})

Emitted when building the UI, the event args allow passing a native view instance back via args.view.

See CreateViewEventData

Previous
ListView