Back to Aframe

A Text

docs/primitives/a-text.md

1.7.11.2 KB
Original Source

Wraps the text component.

Example

html
<a-text value="Hello, World!"></a-text>

Attributes

AttributeComponent Mapping
aligntext.align
alpha-testtext.alphaTest
anchortext.anchor
baselinetext.baseline
colortext.color
fonttext.font
font-imagetext.fontImage
heighttext.height
letter-spacingtext.letterSpacing
line-heighttext.lineHeight
opacitytext.opacity
shadertext.shader
sidetext.side
tab-sizetext.tabSize
transparenttext.transparent
valuetext.value
white-spacetext.whiteSpace
widthtext.width
wrap-counttext.wrapCount
wrap-pixelstext.wrapPixels
z-offsettext.zOffset

Limitations

To interact with the text via raycaster or cursor, we need to add geometry like a plane to the text.

html
<a-text value="Now Interactable" geometry="primitive:plane"></a-text>