From e65fdb0abc66ddbce3c6671dad2ab9f5b1bd1acb Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Fri, 16 Jan 2026 04:52:33 +0100 Subject: [PATCH] feat: add interactive UI component templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add 10 new templates showcasing native HTML features: - Accordion FAQ: using
and - Form Validation: HTML5 validation attributes - Toggle Switch: styled checkbox as iOS toggle - CSS Tabs: pure CSS tabs with radio buttons - Modal Dialog: native element - Tooltip: CSS-only hover tooltips - Progress Steps: checkout wizard indicator - Dropdown Menu: CSS :hover/:focus-within - Star Rating: interactive CSS-only stars - Search Box: styled search with suggestions 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- src/config/playground-templates.js | 910 +++++++++++++++++++++++++++++ 1 file changed, 910 insertions(+) diff --git a/src/config/playground-templates.js b/src/config/playground-templates.js index e3cc1b0..c5c8faa 100644 --- a/src/config/playground-templates.js +++ b/src/config/playground-templates.js @@ -1423,6 +1423,916 @@ export const playgroundTemplates = [
Wow that's awesome! 😍
Can you teach me?
+` + }, + { + name: "Accordion FAQ", + code: ` + +
+

Frequently Asked Questions

+
+ How do I get started? +
Simply create an account and follow our step-by-step guide. It takes less than 5 minutes!
+
+
+ Is there a free trial? +
Yes! We offer a 14-day free trial with full access to all features.
+
+
+ Can I cancel anytime? +
Absolutely. No contracts, no commitments. Cancel with one click.
+
+
` + }, + { + name: "Form Validation", + code: ` + +
+

Create Account

+ + + + + +

Must be at least 8 characters

+ + + + + +
` + }, + { + name: "Toggle Switch", + code: ` + +
+
+
+

Dark Mode

+

Use dark theme

+
+ +
+
+
+

Notifications

+

Get push alerts

+
+ +
+
+
+

Auto-save

+

Save automatically

+
+ +
+
` + }, + { + name: "CSS Tabs", + code: ` + +
+ + + + +
+ + + +
+ +
+

Welcome! 👋

+

This is a CSS-only tab component using radio buttons.

+
+
+

Features ✨

+

No JavaScript needed! Pure CSS magic with :checked selector.

+
+
+

Pricing 💰

+

It's free! Open source and ready to use.

+
+
` + }, + { + name: "Modal Dialog", + code: ` + + + + + + + +` + }, + { + name: "Tooltip", + code: ` + +
+ + Tooltip on top! +
+ +
+ + Tooltip on bottom! +
` + }, + { + name: "Progress Steps", + code: ` + +
+
+
+ Cart +
+
+
+ Shipping +
+
+
3
+ Payment +
+
+
4
+ Done +
+
` + }, + { + name: "Dropdown Menu", + code: ` + +` + }, + { + name: "Star Rating", + code: ` + +

Click to rate:

+
+ + + + + + + + + + +
+ +
+ ★★★★☆ + 4.2 + (128 reviews) +
` + }, + { + name: "Search Box", + code: ` + +
+ +
+
+ 🕐 Recent search +
+
+ 🔥 Trending topic +
+
+ 📁 In your files +
+
` } ];