Skip to main content

Tag Reference

Here is a complete list of the tags that are available in PlayCanvas Web Components.

The attributes of every tag share the same value conventions: an absent (or removed) attribute means the engine default applies, and an invalid value logs a console warning and falls back to the default. See Attributes for how booleans, numbers, enums, vectors and colors are written.

Tags also have placement rules — each tag's page notes the parent it requires. A misplaced element logs a console warning naming the parents it would accept, so keep the console open while authoring.

Three tags front an engine entity, and a component tag can sit inside any of them: <pc-entity>, <pc-model> and <pc-node>. So a component placed inside a model attaches to that model, and one placed inside a node attaches to the node — both take the same component children an entity does.

A component tag spells the engine component it adds

Drop the pc- prefix, drop the hyphens, and you have the engine's component id: <pc-layout-group> adds entity.layoutgroup, <pc-rigid-body> adds entity.rigidbody, <pc-audio-listener> adds entity.audiolistener. The rule holds in both directions for every component tag below, so neither spelling has to be memorized. The engine's ids run their words together only because they are JavaScript property names, which cannot carry a hyphen — an HTML tag can.

A repeatable child takes its parent's tag as a prefix: <pc-anim-clip> inside <pc-anim>, <pc-sound-slot> inside <pc-sound>, <pc-script-instance> inside <pc-script>.

TagDescription
<pc-anim>Defines an animation component that plays animation clips.
<pc-anim-clip>Defines a single clip assigned to an animation component.
<pc-app>Defines the root element of your application.
<pc-asset>Defines an asset to be loaded by your application.
<pc-audio-listener>Defines an audio listener component.
<pc-button>Defines a button component.
<pc-camera>Defines a camera that is used to render the scene.
<pc-collision>Defines a collision component used by triggers and rigid bodies.
<pc-element>Defines a text, image or group user interface element.
<pc-entity>Defines an entity.
<pc-gsplat>Defines a gsplat component that renders 3D Gaussian Splats.
<pc-joint>Defines a physics joint constraining two rigid bodies.
<pc-layout-child>Defines a layout child component.
<pc-layout-group>Defines a layout group component.
<pc-light>Defines a light component.
<pc-material>Defines a material that render components can reference.
<pc-model>Defines an entity that instantiates a 3D model from a GLB file.
<pc-node>Binds to a node inside a loaded model to override it.
<pc-particle-system>Defines a particle system component.
<pc-render>Defines a render component.
<pc-rigid-body>Defines a rigid body component.
<pc-scene>Defines a scene.
<pc-screen>Defines a screen component that can render element components.
<pc-script>Defines a script component.
<pc-script-instance>Defines a single script assigned to a script component.
<pc-scrollbar>Defines a scrollbar component.
<pc-scroll-view>Defines a scroll view component.
<pc-sky>Defines an image-based skybox.
<pc-sound>Defines a sound component.
<pc-sound-slot>Defines a single sound assigned to a sound component.
<pc-wasm>Defines a WebAssembly module.