@editframe/create 0.44.0 → 0.45.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/index.js +16 -28
- package/dist/index.js.map +1 -1
- package/dist/skills/editframe-brand-video-generator/README.md +155 -0
- package/dist/skills/editframe-brand-video-generator/SKILL.md +207 -0
- package/dist/skills/editframe-brand-video-generator/references/brand-examples.md +178 -0
- package/dist/skills/editframe-brand-video-generator/references/color-psychology.md +227 -0
- package/dist/skills/editframe-brand-video-generator/references/composition-patterns.md +383 -0
- package/dist/skills/editframe-brand-video-generator/references/editing.md +66 -0
- package/dist/skills/editframe-brand-video-generator/references/emotional-arcs.md +496 -0
- package/dist/skills/editframe-brand-video-generator/references/genre-selection.md +135 -0
- package/dist/skills/editframe-brand-video-generator/references/transition-styles.md +611 -0
- package/dist/skills/editframe-brand-video-generator/references/typography-personalities.md +326 -0
- package/dist/skills/editframe-brand-video-generator/references/video-archetypes.md +86 -0
- package/dist/skills/editframe-brand-video-generator/references/video-fundamentals.md +169 -0
- package/dist/skills/editframe-brand-video-generator/references/visual-metaphors.md +50 -0
- package/dist/skills/editframe-composition/SKILL.md +169 -0
- package/dist/skills/editframe-composition/references/audio.md +483 -0
- package/dist/skills/editframe-composition/references/captions.md +844 -0
- package/dist/skills/editframe-composition/references/composition-model.md +73 -0
- package/dist/skills/editframe-composition/references/configuration.md +403 -0
- package/dist/skills/editframe-composition/references/css-parts.md +105 -0
- package/dist/skills/editframe-composition/references/css-variables.md +640 -0
- package/dist/skills/editframe-composition/references/entry-points.md +810 -0
- package/dist/skills/editframe-composition/references/events.md +499 -0
- package/dist/skills/editframe-composition/references/getting-started.md +259 -0
- package/dist/skills/editframe-composition/references/hooks.md +234 -0
- package/dist/skills/editframe-composition/references/image.md +241 -0
- package/dist/skills/editframe-composition/references/r3f.md +580 -0
- package/dist/skills/editframe-composition/references/render-api.md +484 -0
- package/dist/skills/editframe-composition/references/render-strategies.md +119 -0
- package/dist/skills/editframe-composition/references/render-to-video.md +1101 -0
- package/dist/skills/editframe-composition/references/scripting.md +606 -0
- package/dist/skills/editframe-composition/references/sequencing.md +116 -0
- package/dist/skills/editframe-composition/references/server-rendering.md +753 -0
- package/dist/skills/editframe-composition/references/surface.md +329 -0
- package/dist/skills/editframe-composition/references/text.md +627 -0
- package/dist/skills/editframe-composition/references/time-model.md +99 -0
- package/dist/skills/editframe-composition/references/timegroup-modes.md +102 -0
- package/dist/skills/editframe-composition/references/timegroup.md +457 -0
- package/dist/skills/editframe-composition/references/timeline-root.md +398 -0
- package/dist/skills/editframe-composition/references/transcription.md +47 -0
- package/dist/skills/editframe-composition/references/transitions.md +608 -0
- package/dist/skills/editframe-composition/references/use-media-info.md +357 -0
- package/dist/skills/editframe-composition/references/video.md +506 -0
- package/dist/skills/editframe-composition/references/waveform.md +327 -0
- package/dist/skills/editframe-editor-gui/SKILL.md +152 -0
- package/dist/skills/editframe-editor-gui/references/active-root-temporal.md +657 -0
- package/dist/skills/editframe-editor-gui/references/canvas.md +947 -0
- package/dist/skills/editframe-editor-gui/references/controls.md +366 -0
- package/dist/skills/editframe-editor-gui/references/dial.md +756 -0
- package/dist/skills/editframe-editor-gui/references/editor-toolkit.md +587 -0
- package/dist/skills/editframe-editor-gui/references/filmstrip.md +460 -0
- package/dist/skills/editframe-editor-gui/references/fit-scale.md +772 -0
- package/dist/skills/editframe-editor-gui/references/focus-overlay.md +561 -0
- package/dist/skills/editframe-editor-gui/references/hierarchy.md +544 -0
- package/dist/skills/editframe-editor-gui/references/overlay-item.md +634 -0
- package/dist/skills/editframe-editor-gui/references/overlay-layer.md +429 -0
- package/dist/skills/editframe-editor-gui/references/pan-zoom.md +568 -0
- package/dist/skills/editframe-editor-gui/references/pause.md +397 -0
- package/dist/skills/editframe-editor-gui/references/play.md +370 -0
- package/dist/skills/editframe-editor-gui/references/preview.md +391 -0
- package/dist/skills/editframe-editor-gui/references/resizable-box.md +749 -0
- package/dist/skills/editframe-editor-gui/references/scrubber.md +588 -0
- package/dist/skills/editframe-editor-gui/references/thumbnail-strip.md +566 -0
- package/dist/skills/editframe-editor-gui/references/time-display.md +492 -0
- package/dist/skills/editframe-editor-gui/references/timeline-ruler.md +489 -0
- package/dist/skills/editframe-editor-gui/references/timeline.md +604 -0
- package/dist/skills/editframe-editor-gui/references/toggle-loop.md +618 -0
- package/dist/skills/editframe-editor-gui/references/toggle-play.md +526 -0
- package/dist/skills/editframe-editor-gui/references/transform-handles.md +924 -0
- package/dist/skills/editframe-editor-gui/references/trim-handles.md +725 -0
- package/dist/skills/editframe-editor-gui/references/workbench.md +453 -0
- package/dist/skills/editframe-motion-design/SKILL.md +101 -0
- package/dist/skills/editframe-motion-design/references/0-editframe.md +299 -0
- package/dist/skills/editframe-motion-design/references/1-intent.md +201 -0
- package/dist/skills/editframe-motion-design/references/2-physics-model.md +405 -0
- package/dist/skills/editframe-motion-design/references/3-attention.md +350 -0
- package/dist/skills/editframe-motion-design/references/4-process.md +418 -0
- package/dist/skills/editframe-vite-plugin/SKILL.md +75 -0
- package/dist/skills/editframe-vite-plugin/references/file-api.md +111 -0
- package/dist/skills/editframe-vite-plugin/references/getting-started.md +96 -0
- package/dist/skills/editframe-vite-plugin/references/jit-transcoding.md +91 -0
- package/dist/skills/editframe-vite-plugin/references/local-assets.md +75 -0
- package/dist/skills/editframe-vite-plugin/references/visual-testing.md +136 -0
- package/dist/skills/editframe-webhooks/SKILL.md +126 -0
- package/dist/skills/editframe-webhooks/references/events.md +382 -0
- package/dist/skills/editframe-webhooks/references/getting-started.md +232 -0
- package/dist/skills/editframe-webhooks/references/security.md +418 -0
- package/dist/skills/editframe-webhooks/references/testing.md +409 -0
- package/dist/skills/editframe-webhooks/references/troubleshooting.md +457 -0
- package/dist/templates/html/AGENTS.md +13 -0
- package/dist/templates/react/AGENTS.md +13 -0
- package/dist/utils.js +15 -16
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/tsdown.config.ts +4 -0
- package/dist/detectAgent.js +0 -89
- package/dist/detectAgent.js.map +0 -1
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Pause Button Element
|
|
3
|
+
description: Pause button that renders only when the composition is playing, auto-hiding when already paused for clean editor UIs.
|
|
4
|
+
type: reference
|
|
5
|
+
nav:
|
|
6
|
+
parent: "Playback Controls"
|
|
7
|
+
priority: 12
|
|
8
|
+
api:
|
|
9
|
+
attributes:
|
|
10
|
+
- name: target
|
|
11
|
+
type: string
|
|
12
|
+
description: ID of the element to control (optional if nested in composition)
|
|
13
|
+
react:
|
|
14
|
+
generate: true
|
|
15
|
+
componentName: Pause
|
|
16
|
+
importPath: "@editframe/react"
|
|
17
|
+
additionalProps:
|
|
18
|
+
- name: className
|
|
19
|
+
type: string
|
|
20
|
+
description: CSS classes for styling
|
|
21
|
+
- name: children
|
|
22
|
+
type: ReactNode
|
|
23
|
+
description: Content to display as the pause button
|
|
24
|
+
nav:
|
|
25
|
+
parent: "Components / Playback Controls"
|
|
26
|
+
priority: 51
|
|
27
|
+
related: ["play", "toggle-play", "controls"]
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
<!-- html-only -->
|
|
31
|
+
# ef-pause
|
|
32
|
+
<!-- /html-only -->
|
|
33
|
+
<!-- react-only -->
|
|
34
|
+
# Pause
|
|
35
|
+
<!-- /react-only -->
|
|
36
|
+
|
|
37
|
+
Pause button that automatically hides when playback stops.
|
|
38
|
+
|
|
39
|
+
<!-- react-only -->
|
|
40
|
+
## Import
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
import { Pause } from "@editframe/react";
|
|
44
|
+
```
|
|
45
|
+
<!-- /react-only -->
|
|
46
|
+
|
|
47
|
+
## Basic Usage
|
|
48
|
+
|
|
49
|
+
<!-- html-only -->
|
|
50
|
+
```html live
|
|
51
|
+
<ef-timegroup mode="contain" class="w-[720px] h-[480px] bg-black relative">
|
|
52
|
+
<ef-video src="https://assets.editframe.com/bars-n-tone.mp4" class="size-full object-contain"></ef-video>
|
|
53
|
+
|
|
54
|
+
<ef-pause class="absolute top-4 right-4">
|
|
55
|
+
<button class="w-12 h-12 rounded-full bg-black/50 backdrop-blur flex items-center justify-center text-white hover:bg-black/70">
|
|
56
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
|
|
57
|
+
<path d="M6 4h4v16H6zM14 4h4v16h-4z"/>
|
|
58
|
+
</svg>
|
|
59
|
+
</button>
|
|
60
|
+
</ef-pause>
|
|
61
|
+
</ef-timegroup>
|
|
62
|
+
```
|
|
63
|
+
<!-- /html-only -->
|
|
64
|
+
<!-- react-only -->
|
|
65
|
+
```tsx
|
|
66
|
+
import { Pause, Timegroup, Video } from "@editframe/react";
|
|
67
|
+
|
|
68
|
+
<Timegroup mode="contain" className="w-[720px] h-[480px] bg-black relative">
|
|
69
|
+
<Video src="/assets/video.mp4" className="size-full object-contain" />
|
|
70
|
+
|
|
71
|
+
<Pause className="absolute top-4 right-4">
|
|
72
|
+
<button className="w-12 h-12 rounded-full bg-black/50 backdrop-blur flex items-center justify-center text-white hover:bg-black/70">
|
|
73
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
|
|
74
|
+
<path d="M6 4h4v16H6zM14 4h4v16h-4z"/>
|
|
75
|
+
</svg>
|
|
76
|
+
</button>
|
|
77
|
+
</Pause>
|
|
78
|
+
</Timegroup>
|
|
79
|
+
```
|
|
80
|
+
<!-- /react-only -->
|
|
81
|
+
|
|
82
|
+
## Auto-Hide Behavior
|
|
83
|
+
|
|
84
|
+
The pause button automatically sets `display: none` when playback stops. It becomes visible again when playing.
|
|
85
|
+
|
|
86
|
+
<!-- react-only -->
|
|
87
|
+
This allows you to create pause controls that only appear during playback without managing state manually.
|
|
88
|
+
<!-- /react-only -->
|
|
89
|
+
|
|
90
|
+
## Custom Slot Content
|
|
91
|
+
|
|
92
|
+
Slot any content as the pause button:
|
|
93
|
+
|
|
94
|
+
<!-- html-only -->
|
|
95
|
+
```html live
|
|
96
|
+
<ef-timegroup mode="contain" class="w-[720px] h-[480px] bg-black relative">
|
|
97
|
+
<ef-video src="https://assets.editframe.com/bars-n-tone.mp4" class="size-full object-contain"></ef-video>
|
|
98
|
+
|
|
99
|
+
<ef-pause class="absolute bottom-4 right-4">
|
|
100
|
+
<button class="px-6 py-3 bg-red-600 text-white rounded-lg font-bold hover:bg-red-700 shadow-lg">
|
|
101
|
+
⏸ Pause
|
|
102
|
+
</button>
|
|
103
|
+
</ef-pause>
|
|
104
|
+
</ef-timegroup>
|
|
105
|
+
```
|
|
106
|
+
<!-- /html-only -->
|
|
107
|
+
<!-- react-only -->
|
|
108
|
+
```tsx
|
|
109
|
+
<Pause className="absolute bottom-4 right-4">
|
|
110
|
+
<button className="px-6 py-3 bg-red-600 text-white rounded-lg font-bold hover:bg-red-700 shadow-lg">
|
|
111
|
+
⏸ Pause
|
|
112
|
+
</button>
|
|
113
|
+
</Pause>
|
|
114
|
+
```
|
|
115
|
+
<!-- /react-only -->
|
|
116
|
+
|
|
117
|
+
<!-- html-only -->
|
|
118
|
+
## With ef-controls
|
|
119
|
+
|
|
120
|
+
Use with `ef-controls` to control a non-ancestor element:
|
|
121
|
+
|
|
122
|
+
```html
|
|
123
|
+
<ef-timegroup id="my-video" mode="contain" class="w-full h-96">
|
|
124
|
+
<ef-video src="video.mp4" class="size-full"></ef-video>
|
|
125
|
+
</ef-timegroup>
|
|
126
|
+
|
|
127
|
+
<ef-controls target="my-video">
|
|
128
|
+
<ef-pause>
|
|
129
|
+
<button class="px-4 py-2 bg-red-600 text-white rounded">Pause</button>
|
|
130
|
+
</ef-pause>
|
|
131
|
+
</ef-controls>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Target Attribute
|
|
135
|
+
|
|
136
|
+
Directly target an element by ID without `ef-controls`:
|
|
137
|
+
|
|
138
|
+
```html
|
|
139
|
+
<ef-timegroup id="video-1" mode="contain">
|
|
140
|
+
<ef-video src="video.mp4"></ef-video>
|
|
141
|
+
</ef-timegroup>
|
|
142
|
+
|
|
143
|
+
<ef-pause target="video-1">
|
|
144
|
+
<button>Pause</button>
|
|
145
|
+
</ef-pause>
|
|
146
|
+
```
|
|
147
|
+
<!-- /html-only -->
|
|
148
|
+
|
|
149
|
+
<!-- react-only -->
|
|
150
|
+
## With Preview Component
|
|
151
|
+
|
|
152
|
+
Use inside Preview for non-ancestor element control:
|
|
153
|
+
|
|
154
|
+
```tsx
|
|
155
|
+
import { Preview, Pause } from "@editframe/react";
|
|
156
|
+
|
|
157
|
+
<div className="flex flex-col gap-2">
|
|
158
|
+
<Preview className="w-full h-[600px]" />
|
|
159
|
+
|
|
160
|
+
<Pause>
|
|
161
|
+
<button className="w-full px-4 py-2 bg-gray-700 text-white rounded">
|
|
162
|
+
Pause Timeline
|
|
163
|
+
</button>
|
|
164
|
+
</Pause>
|
|
165
|
+
</div>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
The Preview component provides context that Pause automatically consumes.
|
|
169
|
+
<!-- /react-only -->
|
|
170
|
+
|
|
171
|
+
## Separate Play and Pause
|
|
172
|
+
|
|
173
|
+
<!-- html-only -->
|
|
174
|
+
Combine `ef-play` and `ef-pause` for independent buttons that show based on state:
|
|
175
|
+
|
|
176
|
+
```html live
|
|
177
|
+
<ef-timegroup mode="contain" class="w-[720px] h-[480px] bg-black relative">
|
|
178
|
+
<ef-video src="https://assets.editframe.com/bars-n-tone.mp4" class="size-full object-contain"></ef-video>
|
|
179
|
+
|
|
180
|
+
<div class="absolute bottom-4 left-4 flex gap-2">
|
|
181
|
+
<ef-play>
|
|
182
|
+
<button class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">
|
|
183
|
+
▶ Play
|
|
184
|
+
</button>
|
|
185
|
+
</ef-play>
|
|
186
|
+
|
|
187
|
+
<ef-pause>
|
|
188
|
+
<button class="px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700">
|
|
189
|
+
⏸ Pause
|
|
190
|
+
</button>
|
|
191
|
+
</ef-pause>
|
|
192
|
+
</div>
|
|
193
|
+
</ef-timegroup>
|
|
194
|
+
```
|
|
195
|
+
<!-- /html-only -->
|
|
196
|
+
<!-- react-only -->
|
|
197
|
+
Combine `Play` and `Pause` for independent buttons that show based on state:
|
|
198
|
+
|
|
199
|
+
```tsx
|
|
200
|
+
import { Play, Pause, Timegroup, Video } from "@editframe/react";
|
|
201
|
+
|
|
202
|
+
export const VideoWithControls = () => {
|
|
203
|
+
return (
|
|
204
|
+
<Timegroup mode="contain" className="w-[720px] h-[480px] bg-black relative">
|
|
205
|
+
<Video src="/assets/video.mp4" className="size-full object-contain" />
|
|
206
|
+
|
|
207
|
+
<div className="absolute bottom-4 left-4 flex gap-2">
|
|
208
|
+
<Play>
|
|
209
|
+
<button className="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">
|
|
210
|
+
▶ Play
|
|
211
|
+
</button>
|
|
212
|
+
</Play>
|
|
213
|
+
|
|
214
|
+
<Pause>
|
|
215
|
+
<button className="px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700">
|
|
216
|
+
⏸ Pause
|
|
217
|
+
</button>
|
|
218
|
+
</Pause>
|
|
219
|
+
</div>
|
|
220
|
+
</Timegroup>
|
|
221
|
+
);
|
|
222
|
+
};
|
|
223
|
+
```
|
|
224
|
+
<!-- /react-only -->
|
|
225
|
+
|
|
226
|
+
## Floating Pause Button
|
|
227
|
+
|
|
228
|
+
<!-- html-only -->
|
|
229
|
+
```html live
|
|
230
|
+
<ef-timegroup mode="contain" class="w-[720px] h-[480px] bg-black relative group">
|
|
231
|
+
<ef-video src="https://assets.editframe.com/bars-n-tone.mp4" class="size-full object-contain"></ef-video>
|
|
232
|
+
|
|
233
|
+
<ef-pause class="absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity">
|
|
234
|
+
<button class="w-16 h-16 rounded-full bg-white/90 flex items-center justify-center shadow-xl hover:scale-110 transition">
|
|
235
|
+
<svg width="28" height="28" viewBox="0 0 24 24" fill="currentColor">
|
|
236
|
+
<path d="M6 4h4v16H6zM14 4h4v16h-4z"/>
|
|
237
|
+
</svg>
|
|
238
|
+
</button>
|
|
239
|
+
</ef-pause>
|
|
240
|
+
</ef-timegroup>
|
|
241
|
+
```
|
|
242
|
+
<!-- /html-only -->
|
|
243
|
+
<!-- react-only -->
|
|
244
|
+
Create a hover-triggered pause overlay:
|
|
245
|
+
|
|
246
|
+
```tsx
|
|
247
|
+
import { Pause, Timegroup, Video } from "@editframe/react";
|
|
248
|
+
|
|
249
|
+
<Timegroup mode="contain" className="w-[720px] h-[480px] bg-black relative group">
|
|
250
|
+
<Video src="/assets/video.mp4" className="size-full object-contain" />
|
|
251
|
+
|
|
252
|
+
<Pause className="absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity">
|
|
253
|
+
<button className="w-16 h-16 rounded-full bg-white/90 flex items-center justify-center shadow-xl hover:scale-110 transition">
|
|
254
|
+
<svg width="28" height="28" viewBox="0 0 24 24" fill="currentColor">
|
|
255
|
+
<path d="M6 4h4v16H6zM14 4h4v16h-4z"/>
|
|
256
|
+
</svg>
|
|
257
|
+
</button>
|
|
258
|
+
</Pause>
|
|
259
|
+
</Timegroup>
|
|
260
|
+
```
|
|
261
|
+
<!-- /react-only -->
|
|
262
|
+
|
|
263
|
+
## Corner Pause Control
|
|
264
|
+
|
|
265
|
+
<!-- html-only -->
|
|
266
|
+
```html live
|
|
267
|
+
<ef-timegroup mode="contain" class="w-[720px] h-[480px] bg-black relative">
|
|
268
|
+
<ef-video src="https://assets.editframe.com/bars-n-tone.mp4" class="size-full object-contain"></ef-video>
|
|
269
|
+
|
|
270
|
+
<ef-pause class="absolute top-4 left-4">
|
|
271
|
+
<button class="flex items-center gap-2 px-4 py-2 bg-black/60 backdrop-blur text-white rounded-full hover:bg-black/80 transition">
|
|
272
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
|
273
|
+
<path d="M6 4h4v16H6zM14 4h4v16h-4z"/>
|
|
274
|
+
</svg>
|
|
275
|
+
<span class="text-sm font-medium">Pause</span>
|
|
276
|
+
</button>
|
|
277
|
+
</ef-pause>
|
|
278
|
+
</ef-timegroup>
|
|
279
|
+
```
|
|
280
|
+
<!-- /html-only -->
|
|
281
|
+
<!-- react-only -->
|
|
282
|
+
Position pause button with text label:
|
|
283
|
+
|
|
284
|
+
```tsx
|
|
285
|
+
<Pause className="absolute top-4 left-4">
|
|
286
|
+
<button className="flex items-center gap-2 px-4 py-2 bg-black/60 backdrop-blur text-white rounded-full hover:bg-black/80 transition">
|
|
287
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
|
288
|
+
<path d="M6 4h4v16H6zM14 4h4v16h-4z"/>
|
|
289
|
+
</svg>
|
|
290
|
+
<span className="text-sm font-medium">Pause</span>
|
|
291
|
+
</button>
|
|
292
|
+
</Pause>
|
|
293
|
+
```
|
|
294
|
+
<!-- /react-only -->
|
|
295
|
+
|
|
296
|
+
<!-- react-only -->
|
|
297
|
+
## Minimal Pause Icon
|
|
298
|
+
|
|
299
|
+
Simple icon-only pause button:
|
|
300
|
+
|
|
301
|
+
```tsx
|
|
302
|
+
<Pause className="absolute bottom-4 right-4">
|
|
303
|
+
<button className="w-10 h-10 rounded-full bg-red-600/80 backdrop-blur flex items-center justify-center text-white hover:bg-red-600 transition">
|
|
304
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
|
305
|
+
<path d="M6 4h4v16H6zM14 4h4v16h-4z"/>
|
|
306
|
+
</svg>
|
|
307
|
+
</button>
|
|
308
|
+
</Pause>
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
## Custom Pause Icon
|
|
312
|
+
|
|
313
|
+
Use any icon library:
|
|
314
|
+
|
|
315
|
+
```tsx
|
|
316
|
+
import { Pause } from "@editframe/react";
|
|
317
|
+
import { PauseCircle } from "lucide-react";
|
|
318
|
+
|
|
319
|
+
<Pause className="absolute top-4 right-4">
|
|
320
|
+
<button className="text-white hover:text-red-400 transition">
|
|
321
|
+
<PauseCircle size={48} strokeWidth={1.5} />
|
|
322
|
+
</button>
|
|
323
|
+
</Pause>
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
## Bottom Bar Pause
|
|
327
|
+
|
|
328
|
+
Create a pause button in a control bar:
|
|
329
|
+
|
|
330
|
+
```tsx
|
|
331
|
+
import { Pause } from "@editframe/react";
|
|
332
|
+
|
|
333
|
+
<div className="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent p-4">
|
|
334
|
+
<Pause className="flex justify-center">
|
|
335
|
+
<button className="px-8 py-3 bg-white text-black rounded-full font-semibold hover:bg-gray-200 transition">
|
|
336
|
+
Pause
|
|
337
|
+
</button>
|
|
338
|
+
</Pause>
|
|
339
|
+
</div>
|
|
340
|
+
```
|
|
341
|
+
<!-- /react-only -->
|
|
342
|
+
|
|
343
|
+
## Toggle vs Separate Buttons
|
|
344
|
+
|
|
345
|
+
<!-- html-only -->
|
|
346
|
+
- Use `ef-toggle-play` for a single button that switches icons
|
|
347
|
+
- Use separate `ef-play` and `ef-pause` for independent buttons that show/hide based on state
|
|
348
|
+
<!-- /html-only -->
|
|
349
|
+
<!-- react-only -->
|
|
350
|
+
- Use `TogglePlay` for a single button that switches icons
|
|
351
|
+
- Use separate `Play` and `Pause` for independent buttons that show/hide based on state
|
|
352
|
+
<!-- /react-only -->
|
|
353
|
+
- Choose based on your UI design - both approaches work equally well
|
|
354
|
+
|
|
355
|
+
<!-- react-only -->
|
|
356
|
+
## Combining with Other Controls
|
|
357
|
+
|
|
358
|
+
Build a complete control panel:
|
|
359
|
+
|
|
360
|
+
```tsx
|
|
361
|
+
import { Play, Pause, Scrubber, TimeDisplay } from "@editframe/react";
|
|
362
|
+
|
|
363
|
+
export const ControlPanel = () => {
|
|
364
|
+
return (
|
|
365
|
+
<div className="bg-gray-800 p-4 flex items-center gap-4">
|
|
366
|
+
<Play>
|
|
367
|
+
<button className="w-10 h-10 text-white">▶</button>
|
|
368
|
+
</Play>
|
|
369
|
+
|
|
370
|
+
<Pause>
|
|
371
|
+
<button className="w-10 h-10 text-white">⏸</button>
|
|
372
|
+
</Pause>
|
|
373
|
+
|
|
374
|
+
<TimeDisplay className="text-white text-sm font-mono" />
|
|
375
|
+
<Scrubber className="flex-1" />
|
|
376
|
+
</div>
|
|
377
|
+
);
|
|
378
|
+
};
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
## Accessibility
|
|
382
|
+
|
|
383
|
+
Ensure the button inside Pause has proper labels:
|
|
384
|
+
|
|
385
|
+
```tsx
|
|
386
|
+
<Pause className="absolute top-4 right-4">
|
|
387
|
+
<button
|
|
388
|
+
aria-label="Pause video"
|
|
389
|
+
className="w-12 h-12 rounded-full bg-black/50 backdrop-blur flex items-center justify-center text-white"
|
|
390
|
+
>
|
|
391
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
|
|
392
|
+
<path d="M6 4h4v16H6zM14 4h4v16h-4z"/>
|
|
393
|
+
</svg>
|
|
394
|
+
</button>
|
|
395
|
+
</Pause>
|
|
396
|
+
```
|
|
397
|
+
<!-- /react-only -->
|