Skip to content

Commit 6f8f484

Browse files
committed
docs: document the visual style editor
1 parent 043d8db commit 6f8f484

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ A visual drag-and-drop form builder plugin for [Strapi 5](https://strapi.io). Cr
2121
- **Spam & limits** — honeypot field plus optional per-IP hourly rate limiting.
2222
- **CAPTCHA** — optional Cloudflare Turnstile or Google reCAPTCHA v2 per form, verified server-side (fail-closed). The secret key never reaches the browser.
2323
- **Hidden tracking fields** — capture UTM parameters, referrers or campaign IDs from the page URL into every submission.
24+
- **Visual style editor** — a dedicated Style mode with a live Desktop/Mobile preview: accent, fonts, backgrounds, corners, field & button styles, spacing, shadow, card border and placement, plus editable colour palettes. No CSS required; changes follow draft / publish.
2425
- **Submission inbox** — search, filter by status (new / read / archived), bulk mark-as-read / archive / delete, per-form column picker, a detail drawer with next/previous navigation, and CSV export.
2526
- **Form preview** — preview the rendered form inside the admin before publishing.
2627

@@ -214,6 +215,7 @@ Each rule accepts an optional **custom error message**. The same rule type canno
214215
| Honeypot protection | Adds a hidden field to silently discard bot submissions |
215216
| Rate limiting | Caps submissions per IP each hour (configurable max) |
216217
| CAPTCHA | None, Cloudflare Turnstile or Google reCAPTCHA v2 — with a **Test secret key** button to validate credentials before publishing |
218+
| Custom styles | Enables the visual **Style** editor for the form (see below) |
217219
| Redirect URL | Where to send the visitor after a successful submit |
218220

219221
---
@@ -246,9 +248,24 @@ The captured value is stored with the submission and included in the CSV export.
246248

247249
---
248250

249-
## Styling the embedded form
251+
## Styling
250252

251-
The embedded form renders in the host page's DOM (no shadow DOM), so you can restyle it from your own site.
253+
### Visual style editor (no code)
254+
255+
Turn on **Custom styles** in the form's Settings drawer to reveal a **Style** tab next to **Fields**. It opens a dedicated editor with a live Desktop/Mobile preview:
256+
257+
- **Brand** — accent colour, font (Sans / Serif / Round / Mono).
258+
- **Background** — form card and page colours.
259+
- **Fields** — corners (Sharp / Rounded / Pill), style (Outline / Filled / Underline), label weight.
260+
- **Button** — style (Solid / Outline) and width (Full / Auto).
261+
- **Layout** — form width, spacing, card shadow, card border, card corners, and placement (Top / Center).
262+
- **Colour palettes** are editable — add colours with the picker, remove any swatch; they're saved with the form. **Reset to default theme** restores everything.
263+
264+
Everything resolves to a small set of `--sfb-*` CSS variables applied to both the preview and the public form, so the preview matches production. Style changes follow the normal **draft / publish** flow — they go live when you publish.
265+
266+
### Overriding styles from your own site
267+
268+
The embedded form renders in the host page's DOM (no shadow DOM), so you can also restyle it from your own site.
252269

253270
**CSS variables** (the recommended, stable API):
254271

@@ -321,7 +338,7 @@ Pull requests are welcome. For major changes please open an issue first to discu
321338
- [x] Export submissions as CSV
322339
- [x] CAPTCHA / spam protection (Cloudflare Turnstile · reCAPTCHA v2)
323340
- [x] Hidden tracking fields (UTM / referrer capture)
324-
- [ ] Theming / style presets
341+
- [x] Visual style editor (theming, live preview)
325342
- [ ] Email notifications on new submission
326343
- [ ] File upload field type
327344
- [ ] Multi-step / wizard forms

0 commit comments

Comments
 (0)