Skip to main content

HorizontalAlignment

Defines local horizontal alignment types for text typesetting, which refers to the horizontal alignment relative to the writing direction.

TypeNameInterface Description
EnumCenter

• Function: Center horizontally.

EnumFlush

• Function: Justifies text to fill the container width.

EnumLeft

• Function: Align to left edge.

EnumRight

• Function: Align to right edge.

Examples​

Center​

let value = APJS.HorizontalAlignment.Center;

Flush​

let value = APJS.HorizontalAlignment.Flush;

Left​

let value = APJS.HorizontalAlignment.Left;
let value = APJS.HorizontalAlignment.Right;

Use Case​

@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use HorizontalAlignment here
}
onUpdate(deltaTime: number) {
}
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies