<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKLabelNode",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKLabelNode"
  },
  "title" : "SKLabelNode"
}
-->

# SKLabelNode

A graphical element that draws text.

```
class SKLabelNode
```

## Overview

`SKLabelNode` allows you to render text in your scene. You can define a custom style using properties such as [`fontName`](/documentation/SpriteKit/SKLabelNode/fontName) and [`fontColor`](/documentation/SpriteKit/SKLabelNode/fontColor), or configure the look of your text with an <doc://com.apple.documentation/documentation/Foundation/NSAttributedString>.

## Topics

### Getting Started with Labels

[Adding Text to a Scene](/documentation/SpriteKit/adding-text-to-a-scene)

Draw text in your scene, such as a health indicator or a “Game Over” banner, by using a label node.

### Creating a Label

[`init(fontNamed:)`](/documentation/SpriteKit/SKLabelNode/init(fontNamed:))

Initializes a new label object with a specified font.

[`labelNodeWithFontNamed:`](/documentation/SpriteKit/SKLabelNode/labelNodeWithFontNamed:)

Initializes a new label object.

[`init(text:)`](/documentation/SpriteKit/SKLabelNode/init(text:))

Initializes a new label object with a text string.

[`init(attributedText:)`](/documentation/SpriteKit/SKLabelNode/init(attributedText:))

Initializes a new label object with an attributed text string.

### Setting a Label’s Text

[`text`](/documentation/SpriteKit/SKLabelNode/text)

The string that the label node displays.

[`attributedText`](/documentation/SpriteKit/SKLabelNode/attributedText)

The attributed string displayed by the label.

### Specifying a Label’s Font

[`fontColor`](/documentation/SpriteKit/SKLabelNode/fontColor)

The color of the label.

[`fontName`](/documentation/SpriteKit/SKLabelNode/fontName)

The font used for the text in the label.

[`fontSize`](/documentation/SpriteKit/SKLabelNode/fontSize)

The size of the font used in the label.

### Controlling a Label’s Alignment

[`verticalAlignmentMode`](/documentation/SpriteKit/SKLabelNode/verticalAlignmentMode)

The vertical position of the text within the node.

[`SKLabelVerticalAlignmentMode`](/documentation/SpriteKit/SKLabelVerticalAlignmentMode)

Options for aligning text vertically.

[`horizontalAlignmentMode`](/documentation/SpriteKit/SKLabelNode/horizontalAlignmentMode)

The horizontal position of the text within the node.

[`SKLabelHorizontalAlignmentMode`](/documentation/SpriteKit/SKLabelHorizontalAlignmentMode)

Options for aligning text horizontally.

### Defining a Label’s Line-Breaking Behavior

Configure these properties to control line-breaking behavior.

[`preferredMaxLayoutWidth`](/documentation/SpriteKit/SKLabelNode/preferredMaxLayoutWidth)

The width, in screen points, after which line-break mode should be applied.

[`lineBreakMode`](/documentation/SpriteKit/SKLabelNode/lineBreakMode)

Determines the line-break mode for multiple lines.

[`numberOfLines`](/documentation/SpriteKit/SKLabelNode/numberOfLines)

Determines the number of lines to draw.

### Colorizing a Label

[`color`](/documentation/SpriteKit/SKLabelNode/color)

An alternative to the font color that can be used for animations.

[`colorBlendFactor`](/documentation/SpriteKit/SKLabelNode/colorBlendFactor)

A floating-point value that describes how the color is blended with the font color.

### Configuring Alpha Blending

Change how a label uses an alpha value, such as additive blending, that results in the label being brighter than it was before.

[`blendMode`](/documentation/SpriteKit/SKLabelNode/blendMode)

The blend mode used to draw the label into the parent’s framebuffer.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)