You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add components description in getting started (pyscript#417)
* add missing tags in getting started
* add py-config tag to getting started
* Edits to Fabio's tags/definitions
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update getting-started.md
Co-authored-by: Idan <ienglander@anaconda.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: idanenglander <60263976+idanenglander@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/tutorials/getting-started.md
+37-7Lines changed: 37 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -211,14 +211,44 @@ fig
211
211
212
212
The `<py-repl>` tag creates a REPL component that is rendered to the page as a code editor, allowing you to write executable code inline.
213
213
214
-
## Visual components
214
+
## The py-config tag
215
215
216
-
The following tags control visual attributes of your HTML page.
216
+
Use the `<py-config>` tag to set and configure general metadata about your PyScript application in YAML format. If you are unfamiliar with YAML, consider reading [Red Hat's YAML for beginners](https://www.redhat.com/sysadmin/yaml-beginners) guide for more information.
The following optional values are supported by `<py-config>`:
232
+
233
+
* autoclose_loader (boolean): If false, PyScript will not close the loading splash screen when the startup operations finish.
234
+
* name (string): Name of the user application. This field can be any string and is to be used by the application author for their own customization purposes.
235
+
* version (string): Version of the user application. This field can be any string and is to be used by the application author for their own customization purposes. It is not related to the PyScript version.
236
+
* runtimes (List of Runtimes): List of runtime configurations. Each Runtime expects the following fields:
237
+
* src (string, Required): URL to the runtime source.
238
+
* name (string): Name of the runtime. This field can be any string and is to be used by the application author for their own customization purposes.
239
+
* name (string): Programming language supported by the runtime. This field can by used by the application author to provide clarify. It currently has no implications on how PyScript behaves.
240
+
241
+
## Visual component tags
242
+
243
+
The following tags can be used to add visual attributes to your HTML page.
217
244
218
245
| Tag | Description |
219
246
| --- | ----------- |
220
-
|`<py-inputbox>`| TBD |
221
-
|`<py-box>`| TBD |
222
-
|`<py-button>`| TBD |
223
-
|`<py-list>`| TBD |
224
-
|`<py-title>`| TBD |
247
+
|`<py-inputbox>`| Adds an input box that can be used to prompt users to enter input values. |
248
+
|`<py-box>`| Creates a container object that can be used to host one or more visual components that define how elements of `<py-box>` should align and show on the page. |
249
+
|`<py-button>`| Adds a button to which authors can add labels and event handlers for actions on the button, such as `on_focus` or `on_click`. |
250
+
|`<py-title>`| Adds a static text title component that styles the text inside the tag as a page title. |
251
+
252
+
```{note}
253
+
All the elements above are experimental and not implemented at their full functionality. Use them with the understanding that the APIs or full support might change or be removed until the visual components are more mature.
0 commit comments