Skip to content

Commit 091708b

Browse files
Edits to schema docs
1 parent 00f7ff4 commit 091708b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

advanced/schema.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Schema
22

3-
FormKit's schema is a JSON-serializable data format for storing DOM structures and component implementations including FormKit forms. Although created specifically for implementing forms the format is capable of generating any HTML markup or using any third party components. Schemas are rendered using FormKit's `<FormKitSchema>` component.
3+
FormKit's schema is a JSON-serializable data format for storing DOM structures and component implementations including FormKit forms. Although created specifically for implementing forms, the format is capable of generating any HTML markup or using any third-party components. Schemas are rendered using FormKit's `<FormKitSchema>` component.
44

5-
A schema is an array of objects, where each object defines a single HTML element, component, or text node. Simple strings produce text nodes, while components and HTML elements are defined with two different objects (referred to as `$el` and `$cmp`).
5+
A schema is an array of objects (called "schema nodes"), where each object defines a single HTML element, component, or text node. Simple strings produce text nodes, while components and HTML elements are defined with two different objects (referred to as `$el` and `$cmp`).
66

7-
## HTML Elements ($el)
7+
## HTML elements ($el)
88

9-
HTML elements are defined using the `$el` property. You can use `$el` to render any HTML element. Attributes can be added with the `attrs` property, and content is assigned with the `children` property.
9+
HTML elements are defined using the `$el` property. You can use `$el` to render any HTML element. Attributes can be added with the `attrs` property, and content is assigned with the `children` property:
1010

1111
<example
1212
name="Schema - elements"
@@ -206,6 +206,7 @@ name="Schema - **raw**"
206206
file="/\_content/examples/schema-raw/schema-raw.vue"></example>
207207

208208
Notice if you remove the `__raw__` prefix from the above example, the prefix no longer has effect — this is because the `sectionsSchema` prop’s value was parsed when creating the component instead of passed as a JavaScript object.
209+
209210
## FormKit Inputs
210211

211212
Although schemas can be used for almost any purpose — the primary objective is to empower developers to build complex and dynamic forms using a serializable data format. Using the schema with FormKit inputs covers this use case well.

0 commit comments

Comments
 (0)