@tjakoen/grain 0.1.21 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/contract.test.ts +88 -1
- package/ai/contract.ts +96 -3
- package/ai/interaction-layer.test.ts +58 -0
- package/ai/manifest-dom.test.ts +59 -5
- package/ai/manifest-dom.ts +42 -11
- package/ai/reasoner-kit.test.ts +11 -1
- package/ai/reasoner-kit.ts +40 -2
- package/ai/reasoner.test.ts +55 -0
- package/ai/reasoner.ts +75 -2
- package/ai/vocab-reference.ts +3 -0
- package/catalog/catalog.ts +56 -14
- package/components/atoms/b-check/b-check.html +27 -0
- package/components/atoms/b-check/b-check.md +67 -0
- package/components/atoms/b-checkbox/b-checkbox.css +61 -0
- package/components/atoms/b-checkbox/b-checkbox.html +17 -0
- package/components/atoms/b-checkbox/b-checkbox.md +83 -0
- package/components/atoms/b-choice/b-choice.html +16 -0
- package/components/atoms/b-choice/b-choice.md +35 -0
- package/components/atoms/b-field/b-field.html +17 -0
- package/components/atoms/b-field/b-field.md +43 -0
- package/components/atoms/b-input/b-input.css +20 -0
- package/components/atoms/b-input/b-input.html +7 -2
- package/components/atoms/b-input/b-input.md +27 -1
- package/components/atoms/b-memo/b-memo.html +21 -0
- package/components/atoms/b-memo/b-memo.md +34 -0
- package/components/atoms/b-option/b-option.html +5 -0
- package/components/atoms/b-option/b-option.md +13 -0
- package/components/atoms/b-radio/b-radio.html +17 -0
- package/components/atoms/b-radio/b-radio.md +57 -0
- package/components/atoms/b-textarea/b-textarea.css +48 -0
- package/components/atoms/b-textarea/b-textarea.html +15 -0
- package/components/atoms/b-textarea/b-textarea.md +70 -0
- package/components/form-from-data.test.ts +314 -0
- package/components/molecules/form-grid/form-grid.css +42 -0
- package/components/molecules/form-grid/form-grid.md +64 -0
- package/package.json +1 -1
- package/scripts/ai-dispatch.js +74 -4
- package/scripts/ai-dispatch.test.ts +68 -0
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
<!-- atoms/b-input — labelled text field. Config props: name, type, placeholder,
|
|
2
|
-
required (bare boolean), variant, size. Usable self-closed.
|
|
1
|
+
<!-- atoms/b-input — labelled text field. Config props: label, name, type, placeholder,
|
|
2
|
+
required (bare boolean), hint, error, variant, size. Usable self-closed.
|
|
3
|
+
The two message slots start EMPTY on purpose. A prop-text whose prop is not supplied leaves the
|
|
4
|
+
template's own text in place (measured), so a slot with a fallback would print that fallback on
|
|
5
|
+
every field nobody wrote a hint for. Empty, they collapse under .field__hint:empty. -->
|
|
3
6
|
<label class="field" prop-attr-data-variant="variant" prop-attr-data-size="size">
|
|
4
7
|
<span class="field__label" prop-text="label">Label</span>
|
|
5
8
|
<input class="field__input"
|
|
6
9
|
prop-attr-name="name" prop-attr-type="type"
|
|
7
10
|
prop-attr-placeholder="placeholder" prop-attr-required="required">
|
|
11
|
+
<span class="field__hint" prop-text="hint"></span>
|
|
12
|
+
<span class="field__error" prop-text="error"></span>
|
|
8
13
|
</label>
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
# Input
|
|
2
2
|
|
|
3
|
-
A labelled text field. Compose several inside a `<form>` to build any form
|
|
3
|
+
A labelled text field. Compose several inside a `<form>` to build any form, or lay them out with the
|
|
4
|
+
[Form grid](../../molecules/form-grid/form-grid.md).
|
|
4
5
|
As a component: `<b-input name="email" label="Email" required />` — `required` is a
|
|
5
6
|
bare boolean, and the tag may self-close.
|
|
6
7
|
|
|
8
|
+
This atom owns the frame the whole field family shares, which is three things beyond the input
|
|
9
|
+
itself. Two message slots sit under the control, a quiet hint and an error, and both collapse when
|
|
10
|
+
empty so a template can carry them unconditionally. An error is not a red one: status here is weight
|
|
11
|
+
against the hint's fade rather than hue. Third is the required marker, which nothing has to add: the
|
|
12
|
+
frame reads the attribute the browser already needs, so the marker cannot drift from the constraint,
|
|
13
|
+
no author can forget it, and every atom in the family gets it at once.
|
|
14
|
+
|
|
7
15
|
## States
|
|
8
16
|
|
|
9
17
|
### Default
|
|
@@ -22,6 +30,24 @@ bare boolean, and the tag may self-close.
|
|
|
22
30
|
</label>
|
|
23
31
|
```
|
|
24
32
|
|
|
33
|
+
### Required, with a hint
|
|
34
|
+
```html
|
|
35
|
+
<label class="field">
|
|
36
|
+
<span class="field__label">Email</span>
|
|
37
|
+
<input class="field__input" type="email" name="email" placeholder="jane@example.com" required>
|
|
38
|
+
<span class="field__hint">Only used to reply to you.</span>
|
|
39
|
+
</label>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### With an error
|
|
43
|
+
```html
|
|
44
|
+
<label class="field">
|
|
45
|
+
<span class="field__label">Email</span>
|
|
46
|
+
<input class="field__input" type="email" name="email" value="jane@" required>
|
|
47
|
+
<span class="field__error">That address is missing everything after the at sign.</span>
|
|
48
|
+
</label>
|
|
49
|
+
```
|
|
50
|
+
|
|
25
51
|
## Variants
|
|
26
52
|
|
|
27
53
|
### Default (stacked)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- atoms/b-memo — a labelled MULTI-LINE field built from DATA: the data-first sibling of
|
|
2
|
+
b-textarea, exactly as b-field is b-input's and b-choice is b-select's. Use it with each= over
|
|
3
|
+
a field spec (`<b-memo each="messages" rows="6">`). Per-item DATA: label, name, placeholder,
|
|
4
|
+
value, required ("required", not ""), surface, hint, error. Form-wide CONFIG props: size, variant, rows —
|
|
5
|
+
a literal attribute on the tag reaches every item of the each. No .css: the frame is
|
|
6
|
+
b-input.css and the control is b-textarea.css.
|
|
7
|
+
Two rules this atom cannot drop. The surface binds to the TEXTAREA, not to the label around
|
|
8
|
+
it: field.set resolves the address and then writes el.value, so an address on a label points
|
|
9
|
+
at something with nothing to write into and the write is dropped without a word (measured on
|
|
10
|
+
2026-08-13, and the reason b-field and b-choice were fixed). And the value arrives as CONTENT
|
|
11
|
+
through data-field, never as data-bind-value: a textarea has no value attribute, so a bound
|
|
12
|
+
one would render an attribute the browser ignores and the box would come up empty with
|
|
13
|
+
nothing warning. -->
|
|
14
|
+
<label class="field" prop-attr-data-size="size" prop-attr-data-variant="variant">
|
|
15
|
+
<span class="field__label" data-field="label">Label</span>
|
|
16
|
+
<textarea class="field__textarea" data-bind-data-surface="surface"
|
|
17
|
+
data-bind-name="name" data-bind-placeholder="placeholder"
|
|
18
|
+
data-bind-required="required" prop-attr-rows="rows" data-field="value"></textarea>
|
|
19
|
+
<span class="field__hint" data-field="hint"></span>
|
|
20
|
+
<span class="field__error" data-field="error"></span>
|
|
21
|
+
</label>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Memo (from data)
|
|
2
|
+
|
|
3
|
+
The data-first sibling of the [Textarea](../b-textarea/b-textarea.md), and the third member of the
|
|
4
|
+
family [Field](../b-field/b-field.md) and [Choice](../b-choice/b-choice.md) started. Use it when the
|
|
5
|
+
boxes arrive as data. The item shape is label, name, placeholder, value, required, hint, error and
|
|
6
|
+
surface. There is no type, because a textarea has none, and no rows either: height is presentation,
|
|
7
|
+
so it rides on the tag as form-wide config, the split every atom in this family makes.
|
|
8
|
+
|
|
9
|
+
**The one thing this atom does differently:** a textarea has no value attribute. Its value is its
|
|
10
|
+
content, so the item's value binds as content rather than as an attribute. Bound as an attribute the
|
|
11
|
+
browser ignores it completely, the box comes up empty, nothing warns, and the spec looks right. Worth
|
|
12
|
+
knowing before anyone copies the Field's line into a textarea.
|
|
13
|
+
|
|
14
|
+
Writing to one is safe in a way a [Choice](../b-choice/b-choice.md) is not: any string is a legal
|
|
15
|
+
textarea value, so there is nothing it can be handed that empties it.
|
|
16
|
+
|
|
17
|
+
## What it renders
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<label class="field">
|
|
21
|
+
<span class="field__label">Message</span>
|
|
22
|
+
<textarea class="field__textarea" data-surface="field:contact-message" name="message"
|
|
23
|
+
placeholder="What would you like to say?"></textarea>
|
|
24
|
+
</label>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Six rows, form-wide (config)
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<label class="field" data-size="sm">
|
|
31
|
+
<span class="field__label">Message</span>
|
|
32
|
+
<textarea class="field__textarea" data-surface="field:contact-message" name="message" rows="6"></textarea>
|
|
33
|
+
</label>
|
|
34
|
+
```
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!-- atoms/b-option — one <option>, bound from data. PARENT CONTEXT: only meaningful inside
|
|
2
|
+
b-choice's <select>, where a nested each renders one per entry of the item's `options`.
|
|
3
|
+
Per-item DATA: value, label, selected ("selected", not ""). No .css: an option is styled
|
|
4
|
+
by the platform. -->
|
|
5
|
+
<option data-bind-value="value" data-bind-selected="selected" data-field="label">Option</option>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Option (from data)
|
|
2
|
+
|
|
3
|
+
One `<option>`, bound from data. **Parent context required:** it is only meaningful inside
|
|
4
|
+
[Choice](../b-choice/b-choice.md), whose template nests `<b-option each="options">` inside the
|
|
5
|
+
select. On its own it renders stray text, which is why the example below is shown as source rather
|
|
6
|
+
than live.
|
|
7
|
+
|
|
8
|
+
Data: `value`, `label`, and `selected` bound as the string `"selected"` when that option is the
|
|
9
|
+
current one. Any other value, including an empty string, drops the attribute.
|
|
10
|
+
|
|
11
|
+
```html flat
|
|
12
|
+
<option value="hiring" selected="selected">Hiring</option>
|
|
13
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- atoms/b-radio — one radio button in the .field frame: b-checkbox's twin, and a separate file for
|
|
2
|
+
one measured reason rather than for symmetry. A `type` config prop cannot turn a checkbox into a
|
|
3
|
+
radio: PASS 0 appends the prop's attribute next to the literal instead of replacing it, so
|
|
4
|
+
type="checkbox" type="radio" reaches the browser and the first one wins, silently. Two templates
|
|
5
|
+
that each state their own type are the only shape that cannot get this wrong.
|
|
6
|
+
Config props: label, name, value, checked (bare boolean), required (bare boolean), hint, error,
|
|
7
|
+
size. Usable self-closed. No .css: the frame is b-input.css and the control is b-checkbox.css.
|
|
8
|
+
Radios are a GROUP: every radio meant to be mutually exclusive with another carries the same
|
|
9
|
+
`name`, and the group's own question is a heading the page writes above them. -->
|
|
10
|
+
<label class="field" prop-attr-data-size="size">
|
|
11
|
+
<input type="radio" class="field__box"
|
|
12
|
+
prop-attr-name="name" prop-attr-value="value"
|
|
13
|
+
prop-attr-checked="checked" prop-attr-required="required">
|
|
14
|
+
<span class="field__label" prop-text="label">Label</span>
|
|
15
|
+
<span class="field__hint" prop-text="hint"></span>
|
|
16
|
+
<span class="field__error" prop-text="error"></span>
|
|
17
|
+
</label>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Radio
|
|
2
|
+
|
|
3
|
+
One button from a set where exactly one answer is right. As a component:
|
|
4
|
+
`<b-radio label="Reply by email" name="reply" value="email" checked />`, and the tag may self-close.
|
|
5
|
+
It carries no stylesheet: the frame is the [Input](../b-input/b-input.md) and the control is the
|
|
6
|
+
[Checkbox](../b-checkbox/b-checkbox.md), so the row, the sizes, the ring and the AI treatment cannot
|
|
7
|
+
drift from it.
|
|
8
|
+
|
|
9
|
+
Radios are a group, and the group is made by the name. Every button meant to be mutually exclusive
|
|
10
|
+
with another carries the same one, and the question they answer is a heading the page writes above
|
|
11
|
+
them. When the options arrive as data, reach for [Check](../b-check/b-check.md) and let one tag
|
|
12
|
+
render the whole group.
|
|
13
|
+
|
|
14
|
+
## States
|
|
15
|
+
|
|
16
|
+
### A group
|
|
17
|
+
```html
|
|
18
|
+
<div>
|
|
19
|
+
<label class="field">
|
|
20
|
+
<input type="radio" class="field__box" name="reply" value="email" checked>
|
|
21
|
+
<span class="field__label">Reply by email</span>
|
|
22
|
+
</label>
|
|
23
|
+
<label class="field">
|
|
24
|
+
<input type="radio" class="field__box" name="reply" value="call">
|
|
25
|
+
<span class="field__label">Reply by phone</span>
|
|
26
|
+
</label>
|
|
27
|
+
<label class="field">
|
|
28
|
+
<input type="radio" class="field__box" name="reply" value="none">
|
|
29
|
+
<span class="field__label">No reply needed</span>
|
|
30
|
+
</label>
|
|
31
|
+
</div>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### With a hint
|
|
35
|
+
```html
|
|
36
|
+
<label class="field">
|
|
37
|
+
<input type="radio" class="field__box" name="pace" value="soon" checked>
|
|
38
|
+
<span class="field__label">Within the week</span>
|
|
39
|
+
<span class="field__hint">A best effort, not a promise.</span>
|
|
40
|
+
</label>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Focus
|
|
44
|
+
```html
|
|
45
|
+
<label class="field">
|
|
46
|
+
<input type="radio" class="field__box" name="focus-demo" value="one" data-force="focus">
|
|
47
|
+
<span class="field__label">The keyboard ring lands on the control</span>
|
|
48
|
+
</label>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### AI is acting
|
|
52
|
+
```html
|
|
53
|
+
<label class="field" data-commit="pending">
|
|
54
|
+
<input type="radio" class="field__box" name="ai-demo" value="one">
|
|
55
|
+
<span class="field__label">Dashed while the AI works nearby</span>
|
|
56
|
+
</label>
|
|
57
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* atoms/b-textarea — the field family's multi-line control; reuses .field/.field__label from
|
|
2
|
+
b-input and adds .field__textarea, exactly the way b-select adds .field__select. One class per
|
|
3
|
+
element (BEM, component-scoped); variants are attributes, same pattern as the input/select.
|
|
4
|
+
No custom scrollbar and no appearance reset: the platform's own is accessible, and a hand-drawn
|
|
5
|
+
one would need a hardcoded color, which the tokens-only rule does not allow. */
|
|
6
|
+
.field__textarea {
|
|
7
|
+
width: 100%; box-sizing: border-box;
|
|
8
|
+
padding: var(--space-2) var(--space-3);
|
|
9
|
+
font-family: var(--type-font); font-size: var(--text-base); line-height: var(--leading-relaxed);
|
|
10
|
+
color: var(--ink); background: transparent;
|
|
11
|
+
border: var(--border); border-radius: var(--radius-sm); /* hard edge — you tap it, same as the input */
|
|
12
|
+
/* Vertical only: a person can grow the box, and the page can never be shoved sideways by it. */
|
|
13
|
+
resize: vertical;
|
|
14
|
+
/* The default height, in the only unit that means anything here: LINES of the body text it holds,
|
|
15
|
+
plus the padding declared above, since box-sizing is border-box. `rows` overrides it upward when
|
|
16
|
+
an author sets one; without this a textarea comes up two lines tall, which reads as a broken
|
|
17
|
+
input rather than a place to write a paragraph. Composed from tokens, so re-skinning the type
|
|
18
|
+
scale moves it too. */
|
|
19
|
+
min-height: calc(var(--text-base) * var(--leading-relaxed) * 4 + var(--space-2) * 2);
|
|
20
|
+
}
|
|
21
|
+
.field__textarea::placeholder { color: var(--ink-faint); }
|
|
22
|
+
/* focus ring; data-force parallel lets the catalog show the state statically (same pattern as
|
|
23
|
+
b-input) — never `autofocus`, which would steal focus + scroll the catalog on load. */
|
|
24
|
+
.field__textarea:focus-visible, .field__textarea[data-force~="focus"] { outline: 2px solid var(--color-accent); outline-offset: 1px; }
|
|
25
|
+
|
|
26
|
+
/* invalid state — native, no JS. Monochrome: a heavier rule, not a red one. */
|
|
27
|
+
.field__textarea:user-invalid { border-width: 2px; }
|
|
28
|
+
|
|
29
|
+
/* ---- sizes (attribute, on .field, same as b-input) ---- */
|
|
30
|
+
.field[data-size="sm"] .field__textarea { padding: var(--space-1) var(--space-2); font-size: var(--text-sm); }
|
|
31
|
+
.field[data-size="lg"] .field__textarea { padding: var(--space-3) var(--space-4); font-size: var(--text-lg); }
|
|
32
|
+
|
|
33
|
+
/* The inline variant (.field[data-variant="inline"]) is declared on .field itself in b-input.css and
|
|
34
|
+
works here for free. It is a poor fit for a multi-line box and the .md says so, rather than this
|
|
35
|
+
file quietly overriding a variant the frame offers. */
|
|
36
|
+
|
|
37
|
+
/* ---- AI / in-transit: the non-text grain, same language as the input/select (AI-INTERFACE §5).
|
|
38
|
+
A textarea the AI is touching (live pending, or any grain ancestor) wears the dashed "terminal"
|
|
39
|
+
edge; the label + value already swap to the grain family via --type-font. EXCEPTION: while the AI
|
|
40
|
+
is actively COMPOSING, the dispatcher sets data-grade="smooth" on the textarea itself (clean ink,
|
|
41
|
+
real caret, like a human typing) — so that stays solid. The `:not([data-grade="smooth"])` guard
|
|
42
|
+
makes the exception explicit: a self-smooth textarea never matches the dashed rule, so the outcome
|
|
43
|
+
doesn't depend on stylesheet source order. This is the one place the textarea is NOT a copy of the
|
|
44
|
+
input: ai-dispatch.js types into INPUT and TEXTAREA through the same branch, so a missing rule
|
|
45
|
+
here would have meant the AI writing into a control that never showed it was being written to. */
|
|
46
|
+
.field[data-commit="pending"] .field__textarea:not([data-grade="smooth"]),
|
|
47
|
+
[data-grade="grain"] .field__textarea:not([data-grade="smooth"]) { border-style: dashed; }
|
|
48
|
+
.field__textarea[data-grade="smooth"] { border-style: solid; }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- atoms/b-textarea — a labelled MULTI-LINE field: the long-answer sibling of b-input, and the
|
|
2
|
+
rule the .field frame was missing. field.set has always been able to type into a TEXTAREA
|
|
3
|
+
(ai-dispatch.js handles the tag by name), so the op had a target the design system never drew.
|
|
4
|
+
Config props: label, name, placeholder, required (bare boolean), rows, hint, error, variant, size.
|
|
5
|
+
Usable self-closed. Unlike b-field's siblings this one DOES own a stylesheet, because it
|
|
6
|
+
contributes the .field__textarea rule nothing else declares — the same division b-select
|
|
7
|
+
makes when it adds .field__select to a frame b-input owns. -->
|
|
8
|
+
<label class="field" prop-attr-data-variant="variant" prop-attr-data-size="size">
|
|
9
|
+
<span class="field__label" prop-text="label">Label</span>
|
|
10
|
+
<textarea class="field__textarea"
|
|
11
|
+
prop-attr-name="name" prop-attr-placeholder="placeholder"
|
|
12
|
+
prop-attr-required="required" prop-attr-rows="rows"></textarea>
|
|
13
|
+
<span class="field__hint" prop-text="hint"></span>
|
|
14
|
+
<span class="field__error" prop-text="error"></span>
|
|
15
|
+
</label>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Textarea
|
|
2
|
+
|
|
3
|
+
A labelled multi-line field: the long-answer sibling of the [Input](../b-input/b-input.md).
|
|
4
|
+
As a component: `<b-textarea name="message" label="Message" rows="6" required />`. As in the input,
|
|
5
|
+
`required` is a bare boolean and the tag may self-close.
|
|
6
|
+
|
|
7
|
+
This is the rule the field family was missing. The AI layer could always type into a textarea, since
|
|
8
|
+
the dispatcher handles the tag by name in the same branch as an input, so a page that wanted a
|
|
9
|
+
message box had to hand-author one with no frame, no sizes and no AI treatment. It has one now, and
|
|
10
|
+
the data-first sibling is [Memo](../b-memo/b-memo.md).
|
|
11
|
+
|
|
12
|
+
Height is a plain `rows` attribute. Without one the box comes up four lines tall, which is a
|
|
13
|
+
stylesheet rule composed from the type tokens rather than a fixed height, so re-skinning the type
|
|
14
|
+
scale moves it. Resizing is vertical only: a reader can grow the box, and the layout can never be
|
|
15
|
+
pushed sideways by it. The inline variant the `.field` frame offers works here, because it is
|
|
16
|
+
declared on `.field` itself, but a label beside a paragraph box reads badly and stacked is the
|
|
17
|
+
sensible default.
|
|
18
|
+
|
|
19
|
+
## States
|
|
20
|
+
|
|
21
|
+
### Default
|
|
22
|
+
```html
|
|
23
|
+
<label class="field">
|
|
24
|
+
<span class="field__label">Message</span>
|
|
25
|
+
<textarea class="field__textarea" name="message" rows="4" placeholder="What's on your mind?"></textarea>
|
|
26
|
+
</label>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Filled
|
|
30
|
+
```html
|
|
31
|
+
<label class="field">
|
|
32
|
+
<span class="field__label">Message</span>
|
|
33
|
+
<textarea class="field__textarea" name="message" rows="4">Two lines of a real answer,
|
|
34
|
+
so the line height is visible rather than described.</textarea>
|
|
35
|
+
</label>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Focus
|
|
39
|
+
```html
|
|
40
|
+
<label class="field">
|
|
41
|
+
<span class="field__label">Message</span>
|
|
42
|
+
<textarea class="field__textarea" name="message" rows="4" data-force="focus"></textarea>
|
|
43
|
+
</label>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### AI is writing (grain ink)
|
|
47
|
+
```html
|
|
48
|
+
<label class="field" data-commit="pending">
|
|
49
|
+
<span class="field__label">Message</span>
|
|
50
|
+
<textarea class="field__textarea" name="message" rows="4" data-grade="grain">Drafted by the desk, still the AI's ink until you touch it.</textarea>
|
|
51
|
+
</label>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Sizes
|
|
55
|
+
|
|
56
|
+
### Small
|
|
57
|
+
```html
|
|
58
|
+
<label class="field" data-size="sm">
|
|
59
|
+
<span class="field__label">Message</span>
|
|
60
|
+
<textarea class="field__textarea" name="message" rows="3"></textarea>
|
|
61
|
+
</label>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Large
|
|
65
|
+
```html
|
|
66
|
+
<label class="field" data-size="lg">
|
|
67
|
+
<span class="field__label">Message</span>
|
|
68
|
+
<textarea class="field__textarea" name="message" rows="3"></textarea>
|
|
69
|
+
</label>
|
|
70
|
+
```
|