- 
                Notifications
    
You must be signed in to change notification settings  - Fork 50
 
Primitive Components
In addition to their specific properties, all the primitive components also support style, layout and events. Use Typescript to discover more about the properties of a component.
View is the most basic component. It acts as a container that groups other components together.
<view>
  Hello world!
</view>
A clickable view.
Scroll is like View, but it will show a scrollbar when its content overflows it in size.
Text is a special component that can only have literal text as children. It is for advanced use cases where you need a ref to the text component.
Input is used to show editable text fields. It cannot have children.
Supported properties:
- 
value: Initial value of the field - 
placeholder: The placeholder text to show when field is empty - 
readonly: Is the field editable - 
onSubmit: Callback for when enter key is pressed - 
onChange: Callback for when the value has changed 
Image is used to render a texture/sprite.
Supported properties:
- 
source: The sprite to be rendered - 
fit: How the sprite will fit into the containing view - 
tint: The tint color of sprite 
Toggle is used to show a toggle field, checkbox in other words. It cannot have children.
Supported properties:
- 
value: Initial boolean value for on/off - 
onChange: Callback for when the value has changed