OneScript
UI

Overview

View components provided by OneScript.

Create views with TSX components from onescript/views.

ComponentPurpose
TextDisplays text.
DateTextDisplays a JavaScript Date with a system date style.
CodeBlockDisplay code with syntax highlighting. App only.
MarkdownRender Markdown text. App only.
ImageDisplays an image from a Data URL, URL, or Request.
SymbolDisplays an SF Symbol or Pika icon.
LabelPairs a title with an icon.
ProgressViewShows the progress of a task.
ButtonRuns an App callback or Widget action.
MenuShows a list of actions when tapped. App only.
TextFieldAccepts text input.
SecureFieldAccepts a password or other private text. App only.
TextEditorEdits long, multiline text. App only.
ToggleSwitches a boolean value on or off.
PickerChooses one value from a set of options.
SliderSelects a value from a continuous range.
StepperIncrements or decrements a value.
DatePickerChooses a date, a time, or both. App only.
LinkOpens a URL with the system. App only.
ShareLinkShares text or a URL with the share sheet. App only.
EditButtonToggles edit mode, for example for List multiple selection.
SpacerOccupies available space inside a Stack.
DividerDraws a horizontal or vertical separator.

Every view accepts Modifiers. Unsupported view types show a localized error message.

How is this guide?

Last updated on