@strategicnerds/slide-nerds 0.1.0
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/dist/cli/commands/analytics.d.ts +6 -0
- package/dist/cli/commands/analytics.d.ts.map +1 -0
- package/dist/cli/commands/analytics.js +44 -0
- package/dist/cli/commands/analytics.js.map +1 -0
- package/dist/cli/commands/create.d.ts +4 -0
- package/dist/cli/commands/create.d.ts.map +1 -0
- package/dist/cli/commands/create.js +87 -0
- package/dist/cli/commands/create.js.map +1 -0
- package/dist/cli/commands/export.d.ts +6 -0
- package/dist/cli/commands/export.d.ts.map +1 -0
- package/dist/cli/commands/export.js +109 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +12 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/template-path.d.ts +4 -0
- package/dist/cli/template-path.d.ts.map +1 -0
- package/dist/cli/template-path.js +13 -0
- package/dist/cli/template-path.js.map +1 -0
- package/dist/runtime/export-api.d.ts +15 -0
- package/dist/runtime/export-api.d.ts.map +1 -0
- package/dist/runtime/export-api.js +21 -0
- package/dist/runtime/export-api.js.map +1 -0
- package/dist/runtime/index.d.ts +12 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +8 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/light-table.d.ts +8 -0
- package/dist/runtime/light-table.d.ts.map +1 -0
- package/dist/runtime/light-table.js +104 -0
- package/dist/runtime/light-table.js.map +1 -0
- package/dist/runtime/presenter-view.d.ts +7 -0
- package/dist/runtime/presenter-view.d.ts.map +1 -0
- package/dist/runtime/presenter-view.js +62 -0
- package/dist/runtime/presenter-view.js.map +1 -0
- package/dist/runtime/slide-context.d.ts +16 -0
- package/dist/runtime/slide-context.d.ts.map +1 -0
- package/dist/runtime/slide-context.js +18 -0
- package/dist/runtime/slide-context.js.map +1 -0
- package/dist/runtime/slide-controls.d.ts +3 -0
- package/dist/runtime/slide-controls.d.ts.map +1 -0
- package/dist/runtime/slide-controls.js +177 -0
- package/dist/runtime/slide-controls.js.map +1 -0
- package/dist/runtime/slide-dom.d.ts +17 -0
- package/dist/runtime/slide-dom.d.ts.map +1 -0
- package/dist/runtime/slide-dom.js +89 -0
- package/dist/runtime/slide-dom.js.map +1 -0
- package/dist/runtime/slide-runtime.d.ts +7 -0
- package/dist/runtime/slide-runtime.d.ts.map +1 -0
- package/dist/runtime/slide-runtime.js +125 -0
- package/dist/runtime/slide-runtime.js.map +1 -0
- package/dist/runtime/slide-shape.d.ts +21 -0
- package/dist/runtime/slide-shape.d.ts.map +1 -0
- package/dist/runtime/slide-shape.js +115 -0
- package/dist/runtime/slide-shape.js.map +1 -0
- package/dist/runtime/types.d.ts +150 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/runtime/types.js +38 -0
- package/dist/runtime/types.js.map +1 -0
- package/dist/runtime/use-presenter-mode.d.ts +14 -0
- package/dist/runtime/use-presenter-mode.d.ts.map +1 -0
- package/dist/runtime/use-presenter-mode.js +52 -0
- package/dist/runtime/use-presenter-mode.js.map +1 -0
- package/dist/runtime/use-slide-navigation.d.ts +13 -0
- package/dist/runtime/use-slide-navigation.d.ts.map +1 -0
- package/dist/runtime/use-slide-navigation.js +230 -0
- package/dist/runtime/use-slide-navigation.js.map +1 -0
- package/package.json +64 -0
- package/skills/accessibility/SKILL.md +236 -0
- package/skills/advanced-layouts/SKILL.md +429 -0
- package/skills/analytics/SKILL.md +97 -0
- package/skills/animation/SKILL.md +364 -0
- package/skills/brand/SKILL.md +200 -0
- package/skills/data-visualization/SKILL.md +533 -0
- package/skills/deck-templates/SKILL.md +93 -0
- package/skills/diagrams/SKILL.md +395 -0
- package/skills/export/SKILL.md +119 -0
- package/skills/interactive/SKILL.md +292 -0
- package/skills/layout/SKILL.md +178 -0
- package/skills/narrative-frameworks/SKILL.md +250 -0
- package/skills/react-component-embeds/SKILL.md +73 -0
- package/skills/slide-types/SKILL.md +384 -0
- package/skills/slidenerds-runtime/SKILL.md +163 -0
- package/skills/speaker-notes/SKILL.md +128 -0
- package/skills/strategic-frameworks/SKILL.md +392 -0
- package/skills/visual-design/SKILL.md +373 -0
- package/templates/analytics/custom.tsx.tmpl +20 -0
- package/templates/analytics/ga4.tsx.tmpl +15 -0
- package/templates/analytics/gtm.tsx.tmpl +9 -0
- package/templates/analytics/plausible.tsx.tmpl +10 -0
- package/templates/analytics/posthog.tsx.tmpl +14 -0
- package/templates/next-app/CLAUDE.md.tmpl +574 -0
- package/templates/next-app/README.md.tmpl +35 -0
- package/templates/next-app/app/globals.css.tmpl +274 -0
- package/templates/next-app/app/layout.tsx.tmpl +31 -0
- package/templates/next-app/app/page.tsx.tmpl +38 -0
- package/templates/next-app/brand.config.ts.tmpl +32 -0
- package/templates/next-app/package.json.tmpl +25 -0
- package/templates/next-app/postcss.config.mjs.tmpl +8 -0
- package/templates/next-app/tsconfig.json.tmpl +21 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: narrative-frameworks
|
|
3
|
+
description: Storytelling structures for business presentations -- SCQA, Minto Pyramid, PAS, BAB, and other proven frameworks
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Narrative frameworks skill
|
|
7
|
+
|
|
8
|
+
Use this skill when structuring a deck's narrative arc. Each framework here defines a specific slide sequence. Pick one framework per deck. Do not mix frameworks within the same presentation.
|
|
9
|
+
|
|
10
|
+
The deck-templates skill covers complete deck types (investor pitch, product launch, etc.). This skill covers the narrative structure beneath any deck type. A board update can use SCQA. A sales deck can use PAS. A keynote can use Duarte Sparkline. The framework is independent of the content.
|
|
11
|
+
|
|
12
|
+
## SCQA (Situation, Complication, Question, Answer)
|
|
13
|
+
|
|
14
|
+
Origin: Barbara Minto / McKinsey. The standard consulting narrative structure.
|
|
15
|
+
|
|
16
|
+
Use for: board updates, executive recommendations, strategy proposals, any presentation where you are recommending a course of action.
|
|
17
|
+
|
|
18
|
+
### Slide sequence
|
|
19
|
+
|
|
20
|
+
| Slide | Type | Content |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| 1 | Title | Deck title, date, presenter |
|
|
23
|
+
| 2 | Body text | **Situation**: The stable, agreed-upon context. "We have 2,400 customers and $4.2M ARR." |
|
|
24
|
+
| 3 | Body text with emphasis | **Complication**: What changed or what threatens the status quo. "Enterprise win rate dropped from 40% to 18% in Q4." |
|
|
25
|
+
| 4 | Big stat or section divider | **Question**: The strategic question this creates. "How do we rebuild the enterprise pipeline before Series B?" |
|
|
26
|
+
| 5-10 | Mixed (charts, frameworks, tables) | **Answer**: Your recommendation with supporting evidence. 3-5 slides of analysis. |
|
|
27
|
+
| 11 | Summary or action items | Next steps, decision needed, timeline |
|
|
28
|
+
|
|
29
|
+
### When SCQA works
|
|
30
|
+
|
|
31
|
+
- The audience is busy (executives, board members)
|
|
32
|
+
- You need a decision or approval
|
|
33
|
+
- The situation is complex but the recommendation is clear
|
|
34
|
+
- You want to build agreement before revealing the answer
|
|
35
|
+
|
|
36
|
+
### When SCQA fails
|
|
37
|
+
|
|
38
|
+
- The audience already knows the situation (skip S, start at C)
|
|
39
|
+
- There is no clear complication (it becomes a status update, not a story)
|
|
40
|
+
|
|
41
|
+
### SCQA rules
|
|
42
|
+
|
|
43
|
+
- The Situation must be something everyone agrees on. If it is debatable, it is not a situation.
|
|
44
|
+
- The Complication must create tension. If the audience does not feel concerned, it is not a complication.
|
|
45
|
+
- The Question must be the question the audience would ask after hearing the complication.
|
|
46
|
+
- The Answer must be specific and actionable. "We should invest in enterprise sales" is too vague.
|
|
47
|
+
|
|
48
|
+
## SCR (Situation, Complication, Resolution)
|
|
49
|
+
|
|
50
|
+
Origin: McKinsey simplified variant. Drops the explicit Question.
|
|
51
|
+
|
|
52
|
+
Use for: shorter presentations, quick decision requests, internal updates.
|
|
53
|
+
|
|
54
|
+
### Slide sequence
|
|
55
|
+
|
|
56
|
+
| Slide | Type | Content |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| 1 | Title | Deck title |
|
|
59
|
+
| 2 | Body text | **Situation**: Current state in 1-2 sentences |
|
|
60
|
+
| 3 | Body text or chart | **Complication**: What threatens the situation |
|
|
61
|
+
| 4-8 | Mixed | **Resolution**: What to do about it, with evidence |
|
|
62
|
+
| 9 | Action items | Next steps |
|
|
63
|
+
|
|
64
|
+
### SCR vs SCQA
|
|
65
|
+
|
|
66
|
+
SCR is faster. Use it when the question is obvious from the complication. If you say "enterprise win rate dropped 50%," the question "how do we fix it?" is implicit.
|
|
67
|
+
|
|
68
|
+
## Minto Pyramid (answer first)
|
|
69
|
+
|
|
70
|
+
Origin: Barbara Minto, "The Pyramid Principle." The gold standard for executive communication.
|
|
71
|
+
|
|
72
|
+
Use for: any executive presentation. Board decks. Consulting deliverables. Strategy recommendations.
|
|
73
|
+
|
|
74
|
+
### Structure
|
|
75
|
+
|
|
76
|
+
Lead with your answer. Then support it with arguments. Then back each argument with evidence. The audience gets the conclusion on slide 2, not slide 45.
|
|
77
|
+
|
|
78
|
+
### Slide sequence
|
|
79
|
+
|
|
80
|
+
| Slide | Type | Content |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| 1 | Title | Deck title |
|
|
83
|
+
| 2 | Section divider or big stat | **The answer**: Your recommendation or key finding in one sentence |
|
|
84
|
+
| 3 | Section divider | **Argument 1** heading |
|
|
85
|
+
| 4-5 | Charts/data | Evidence supporting argument 1 |
|
|
86
|
+
| 6 | Section divider | **Argument 2** heading |
|
|
87
|
+
| 7-8 | Charts/data | Evidence supporting argument 2 |
|
|
88
|
+
| 9 | Section divider | **Argument 3** heading |
|
|
89
|
+
| 10-11 | Charts/data | Evidence supporting argument 3 |
|
|
90
|
+
| 12 | Summary | Restate the answer with the three supporting arguments |
|
|
91
|
+
| 13 | Action items | Next steps |
|
|
92
|
+
|
|
93
|
+
### Pyramid rules
|
|
94
|
+
|
|
95
|
+
- The answer comes first. Always. If the building catches fire during your presentation, the audience already has the conclusion.
|
|
96
|
+
- Arguments must be MECE (Mutually Exclusive, Collectively Exhaustive). No overlap between arguments. Together they cover the full case.
|
|
97
|
+
- Three arguments is the standard. Two feels thin. Four starts to lose structure.
|
|
98
|
+
- Each argument slide uses an "action title" that states the conclusion, not the topic. "Enterprise revenue grew 3x after adding outbound sales" not "Enterprise revenue."
|
|
99
|
+
|
|
100
|
+
## Problem-Agitate-Solve (PAS)
|
|
101
|
+
|
|
102
|
+
Origin: Copywriting framework adapted for presentations.
|
|
103
|
+
|
|
104
|
+
Use for: sales decks, product pitches, fundraising, any persuasive presentation.
|
|
105
|
+
|
|
106
|
+
### Slide sequence
|
|
107
|
+
|
|
108
|
+
| Slide | Type | Content |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| 1 | Title | Deck title |
|
|
111
|
+
| 2-3 | Body text, big stat | **Problem**: Define the pain point the audience faces. Use a stat to quantify it. |
|
|
112
|
+
| 4-5 | Body text, quote | **Agitate**: Amplify the pain. Show what happens if the problem is not solved. Cost of inaction. Competitive risk. Customer quotes about the pain. |
|
|
113
|
+
| 6 | Section divider | Transition to solution |
|
|
114
|
+
| 7-10 | Product screenshots, charts, demo | **Solve**: Your solution and proof it works. Features, case studies, data. |
|
|
115
|
+
| 11 | Social proof | Customer logos, testimonials |
|
|
116
|
+
| 12 | CTA | Next steps, pricing, trial |
|
|
117
|
+
|
|
118
|
+
### PAS rules
|
|
119
|
+
|
|
120
|
+
- Spend more time on Problem and Agitate than on Solve. The audience must feel the pain before they care about the fix.
|
|
121
|
+
- The Agitate phase is not about fear-mongering. It is about making the cost of inaction concrete. "This costs your team 14 hours per week" is agitation. "Everything will fall apart" is fear-mongering.
|
|
122
|
+
- The transition to Solve should feel like relief, not a sales pitch.
|
|
123
|
+
|
|
124
|
+
## Before-After-Bridge (BAB)
|
|
125
|
+
|
|
126
|
+
Origin: Marketing framework.
|
|
127
|
+
|
|
128
|
+
Use for: transformation stories, product impact, case studies, internal change communication.
|
|
129
|
+
|
|
130
|
+
### Slide sequence
|
|
131
|
+
|
|
132
|
+
| Slide | Type | Content |
|
|
133
|
+
|---|---|---|
|
|
134
|
+
| 1 | Title | Deck title |
|
|
135
|
+
| 2-3 | Body text, stats | **Before**: The current painful state. Quantify with data. |
|
|
136
|
+
| 4-5 | Body text, vision | **After**: The desired future state. Paint the picture of what success looks like. |
|
|
137
|
+
| 6-10 | Mixed | **Bridge**: How to get from Before to After. Your product/plan/strategy is the bridge. |
|
|
138
|
+
| 11 | Summary | Recap the transformation |
|
|
139
|
+
|
|
140
|
+
### BAB vs PAS
|
|
141
|
+
|
|
142
|
+
BAB is aspirational. PAS is pain-driven. Use BAB when the audience is already aware of the problem and needs to see the destination. Use PAS when the audience does not yet feel the urgency.
|
|
143
|
+
|
|
144
|
+
## What-So What-Now What
|
|
145
|
+
|
|
146
|
+
Origin: Military after-action reviews, adapted for business.
|
|
147
|
+
|
|
148
|
+
Use for: data presentations, quarterly reviews, post-mortem readouts, research findings.
|
|
149
|
+
|
|
150
|
+
### Slide sequence
|
|
151
|
+
|
|
152
|
+
| Slide | Type | Content |
|
|
153
|
+
|---|---|---|
|
|
154
|
+
| 1 | Title | Deck title |
|
|
155
|
+
| 2-4 | Charts, tables, data | **What**: Present the facts. Revenue numbers, user metrics, experiment results. No interpretation yet. |
|
|
156
|
+
| 5-7 | Analysis, insights | **So What**: Explain why it matters. What does the data mean? What are the implications? |
|
|
157
|
+
| 8-10 | Recommendations | **Now What**: Recommended actions based on the analysis. Specific next steps with owners and timelines. |
|
|
158
|
+
|
|
159
|
+
### What-So What-Now What rules
|
|
160
|
+
|
|
161
|
+
- The "What" section must be pure data. No opinions, no recommendations.
|
|
162
|
+
- The "So What" section is where interpretation lives. This is where your expertise shows.
|
|
163
|
+
- The "Now What" section must be actionable. Names, dates, owners.
|
|
164
|
+
- This framework works for any presentation that starts with data and ends with decisions.
|
|
165
|
+
|
|
166
|
+
## Duarte Sparkline
|
|
167
|
+
|
|
168
|
+
Origin: Nancy Duarte, "Resonate." The structure behind the best keynotes.
|
|
169
|
+
|
|
170
|
+
Use for: keynotes, vision presentations, change management, any presentation that needs to inspire action.
|
|
171
|
+
|
|
172
|
+
### Structure
|
|
173
|
+
|
|
174
|
+
Alternate between "what is" (the current state) and "what could be" (the future state) throughout the presentation. The contrast creates emotional momentum. End with "the new bliss" -- a vision of the transformed world.
|
|
175
|
+
|
|
176
|
+
### Slide sequence
|
|
177
|
+
|
|
178
|
+
| Slide | Type | Content |
|
|
179
|
+
|---|---|---|
|
|
180
|
+
| 1 | Hook | Open with a story, stat, or question |
|
|
181
|
+
| 2 | What is | Current reality (the problem, the limitation) |
|
|
182
|
+
| 3 | What could be | Vision of the better world |
|
|
183
|
+
| 4 | What is | A deeper look at the current state (data, evidence) |
|
|
184
|
+
| 5 | What could be | More detail on the vision (case study, demo) |
|
|
185
|
+
| 6 | What is | The stakes (what happens if we do not change) |
|
|
186
|
+
| 7 | What could be | The path forward (how we get there) |
|
|
187
|
+
| 8 | What is | Specific obstacle or challenge |
|
|
188
|
+
| 9 | What could be | How the obstacle is overcome |
|
|
189
|
+
| 10 | The new bliss | Final vision. The call to action. What the world looks like when the audience acts. |
|
|
190
|
+
|
|
191
|
+
### Sparkline rules
|
|
192
|
+
|
|
193
|
+
- Each "what is" lowers the audience's emotional state. Each "what could be" raises it.
|
|
194
|
+
- The contrast is what creates energy. If everything is positive, the audience disengages.
|
|
195
|
+
- The final "new bliss" must be higher than any previous "what could be." The presentation builds to a crescendo.
|
|
196
|
+
- This framework requires a strong speaker. It does not work as a read-ahead document.
|
|
197
|
+
|
|
198
|
+
## Monroe's Motivated Sequence
|
|
199
|
+
|
|
200
|
+
Origin: Alan Monroe, 1930s. The classic persuasion structure.
|
|
201
|
+
|
|
202
|
+
Use for: proposals, internal pitches, any time you need the audience to take a specific action.
|
|
203
|
+
|
|
204
|
+
### Slide sequence
|
|
205
|
+
|
|
206
|
+
| Slide | Type | Content |
|
|
207
|
+
|---|---|---|
|
|
208
|
+
| 1 | Hook | **Attention**: Grab attention with a startling stat, story, or question |
|
|
209
|
+
| 2-3 | Problem statement | **Need**: Establish the problem. Show evidence it is real and urgent. |
|
|
210
|
+
| 4-6 | Solution | **Satisfaction**: Present your solution. Show how it meets the need. |
|
|
211
|
+
| 7-8 | Vision | **Visualization**: Paint a picture of the world with your solution adopted. Show the positive outcome AND the negative outcome of inaction. |
|
|
212
|
+
| 9 | CTA | **Action**: Tell the audience exactly what to do next. Be specific. |
|
|
213
|
+
|
|
214
|
+
## The Rule of Three
|
|
215
|
+
|
|
216
|
+
Not a full framework but a structural principle that enhances any framework.
|
|
217
|
+
|
|
218
|
+
### The rule
|
|
219
|
+
|
|
220
|
+
Organize content into groups of three. Three arguments. Three features. Three stats. Three slides per section. The human brain processes groups of three naturally.
|
|
221
|
+
|
|
222
|
+
### Application
|
|
223
|
+
|
|
224
|
+
- **Three supporting arguments** in a Minto Pyramid
|
|
225
|
+
- **Three pain points** in a PAS deck
|
|
226
|
+
- **Three pillars** in a strategy presentation
|
|
227
|
+
- **Three case studies** in a sales deck
|
|
228
|
+
- **Three stats** on a big-number slide
|
|
229
|
+
|
|
230
|
+
If you have four points, see if one can be cut or merged. If you have two, see if a third adds meaningful support. Three is almost always right.
|
|
231
|
+
|
|
232
|
+
## Framework selection guide
|
|
233
|
+
|
|
234
|
+
| Situation | Framework | Why |
|
|
235
|
+
|---|---|---|
|
|
236
|
+
| Recommending a decision to executives | SCQA or Minto Pyramid | Answer-first respects their time |
|
|
237
|
+
| Quarterly data review | What-So What-Now What | Data first, then interpretation, then action |
|
|
238
|
+
| Sales pitch | PAS | Pain creates urgency |
|
|
239
|
+
| Product demo | BAB | Show the transformation |
|
|
240
|
+
| Keynote / vision presentation | Duarte Sparkline | Emotional momentum through contrast |
|
|
241
|
+
| Internal proposal | Monroe's Motivated Sequence | Classic persuasion structure |
|
|
242
|
+
| Quick executive update | SCR | Compressed version of SCQA |
|
|
243
|
+
|
|
244
|
+
## Common mistakes
|
|
245
|
+
|
|
246
|
+
- Burying the recommendation. In business, the answer comes first unless you are building a case for a controversial conclusion.
|
|
247
|
+
- Mixing frameworks within one deck. Pick one and commit.
|
|
248
|
+
- Spending too many slides on context. The audience's patience is shorter than you think.
|
|
249
|
+
- Using PAS for internal audiences who already feel the pain. They do not need to be agitated. They need a solution.
|
|
250
|
+
- Treating the framework as a rigid template. Frameworks are starting points. Adapt slide count and depth to the content and audience.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: react-component-embeds
|
|
3
|
+
description: Build slides that embed reusable React components and live product demos directly inside section[data-slide] blocks
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# React component embeds skill
|
|
7
|
+
|
|
8
|
+
Use this skill when a slide should host real React UI, not static markup. The goal is to keep demos composable, testable, and safe for presentation flow.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
Use this skill when the user asks for any of the following:
|
|
13
|
+
|
|
14
|
+
- Embed an app component directly inside a slide
|
|
15
|
+
- Turn a slide into a live demo surface
|
|
16
|
+
- Reuse an existing feature component inside presentation content
|
|
17
|
+
- Add interactive controls, local state, or network-backed UI in a slide
|
|
18
|
+
|
|
19
|
+
If the request is only static content, use layout or slide-type skills instead.
|
|
20
|
+
|
|
21
|
+
## Core pattern
|
|
22
|
+
|
|
23
|
+
1. Keep the slide shell simple (`section[data-slide]` plus layout container).
|
|
24
|
+
2. Move demo logic into a named React component.
|
|
25
|
+
3. Pass data through props, avoid global mutation.
|
|
26
|
+
4. Keep keyboard interactions compatible with deck navigation.
|
|
27
|
+
5. Add `data-notes` fallback instructions for offline or failure mode.
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
const ProductDemo: React.FC<{ initialQuery: string }> = ({ initialQuery }) => {
|
|
31
|
+
const [query, setQuery] = useState(initialQuery)
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div className="card-surface p-6">
|
|
35
|
+
<label className="text-sm" htmlFor="demo-query">Search</label>
|
|
36
|
+
<input
|
|
37
|
+
id="demo-query"
|
|
38
|
+
value={query}
|
|
39
|
+
onChange={(event) => setQuery(event.target.value)}
|
|
40
|
+
className="mt-2 w-full rounded border px-3 py-2"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
<section data-slide="">
|
|
47
|
+
<div className="flex flex-col w-full" style={{ padding: '4rem 6rem' }}>
|
|
48
|
+
<p className="section-label mb-3">Live demo</p>
|
|
49
|
+
<h2 className="text-[2.5rem] font-bold mb-8">Search behavior in production UI</h2>
|
|
50
|
+
<ProductDemo initialQuery="onboarding" />
|
|
51
|
+
<div data-notes="">
|
|
52
|
+
If the API is unavailable, switch to cached demo data and continue narration.
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</section>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Interaction guardrails
|
|
59
|
+
|
|
60
|
+
- Stop slide-level keybindings while typing by using native `input`, `textarea`, or contentEditable elements.
|
|
61
|
+
- Keep heavy fetches lazy. Start data loading when the slide mounts or on explicit user action.
|
|
62
|
+
- For external systems, include a local fallback state so the deck can still run offline.
|
|
63
|
+
- Use small component boundaries so demos can be tested with React Testing Library.
|
|
64
|
+
|
|
65
|
+
## Quality checklist
|
|
66
|
+
|
|
67
|
+
Before finishing a slide with embedded components, verify:
|
|
68
|
+
|
|
69
|
+
- The component renders correctly inside `section[data-slide]`.
|
|
70
|
+
- User interaction works with mouse and keyboard.
|
|
71
|
+
- Slide navigation still works after interaction.
|
|
72
|
+
- Failure path is documented in `data-notes`.
|
|
73
|
+
- The demo can be reused outside slides without runtime-specific assumptions.
|