CreationKit Documentation

Class Label​Input

public final class LabelInput: InputField<PlaceholderLabel>  

An InputField generic over a PlaceholderLabel.

This label will automatically update itself to show a placeholder when it's text property is set to nil. This field could be used by itself, but it's probably more useful to use a subclass of LabelInputFormLayout. Subclasses of LabelInputFormLayout are the types CreationKit uses internally for it's Forms.

This type only provides the InputField with the label attached. It does not provide any functionality needed by forms. If you're looking for an input field for a form that looks like this, use one of the subclasses of LabelInputFormLayout.

LabelInput LabelInput InputField<PlaceholderLabel> InputField<PlaceholderLabel> LabelInput->InputField<PlaceholderLabel>

Conforms To




public convenience init(
    text: String?, placeholder: String = kLabelInputFieldDefaultPlaceholder)  

Create a new LabelInput with optional text and a placeholder.


text String?

The text to fill the input field with. Defaults to nil.

placeholder String

The placeholder text to display when the text property is nil.