Contribute
Help us grow the SwiftUI snippet collection
Quick Start
Fork this repository
Create your own copy of the project
Add your 3 files
Create a folder component-name.username
in /snippets/
with:
snippet.swift
- Your SwiftUI codemeta.yml
- Component descriptionscreenshot.png
- Component previewSubmit a Pull Request
That's it! Our CI handles the rest automatically
Ready to get started? Click above to fork the repository
File Structure
📦 All Code in One File!
Put all your code in snippet.swift
- don't create separate files!
- • All structs, enums, classes, extensions go in
snippet.swift
- • Our system automatically separates them for display
- • Use
// MARK: - Name
comments to organize sections - • The parser detects structs, enums, classes, extensions, and #Preview automatically
Folder Naming Rules:
Format: component-name.username
Note: The dot (.) separates the component name from the username, not a hyphen.
- • Use kebab-case for component names and usernames
- • No spaces or special characters
- • Must match github-username in meta.yml
meta.yml File
title: Your Snippet Title author: Your Name github-username: yourusername tags: - tag1 - tag2 - tag3 description: A brief description of what your snippet does
Required Fields:
- • title: Short, descriptive name for your snippet
- • author: Your display name (can be your real name or GitHub username)
- • github-username: Your GitHub username (must match folder name)
- • tags: Array of relevant tags (max 3, must use approved tags)
- • description: One sentence explaining what the snippet does
🏷️ Taglines & Tags
Tags help users discover your snippet. Use exactly 3 tags from our approved list.
Popular Tags
Screenshot Requirements
Technical Specs
- • Aspect ratio: 9:16!
- • Format: PNG only! Other formats will be rejected
- • Size: Under 500KB!! Larger files will be rejected
- • Resolution: 800-2000px width, 1000-3000px height
Content Guidelines
- • Show your component in action
- • Use realistic content
- • Avoid placeholder text
- • Make it visually appealing
Taking Screenshots
Taking screenshots from the iOS Simulator is super easy!
Quick Steps:
- • Open your component in the iOS Simulator
- • Press
Command + S
to save a screenshot - • Right-click the screenshot thumbnail that appears
- • Select "Save to Desktop" (or your preferred location)
- • Rename it to
screenshot.png
Your screenshot will be automatically validated for format, size, aspect ratio, and resolution. Invalid images will be rejected with helpful error messages.
Guidelines
Keep snippets simple and focused
One component/feature per snippet
All code in snippet.swift
Put all structs, enums, classes, and extensions in one file - we'll display them beautifully
Use clear, descriptive names
Make it easy to understand what your snippet does
Add relevant tags
Help others discover your snippet
Test your snippet
Make sure it works before submitting
📋Examples
Here are 3 complete examples of how your meta.yml should look:
Example 1: Animated Button
title: Animated Button author: John Doe github-username: john-doe tags: - button - animation - ui description: A beautiful animated button with spring animation and haptic feedback
Folder: animated-button.john-doe/
Example 2: Gradient Card
title: Gradient Card author: Jane Smith github-username: jane-smith tags: - card - gradient - layout description: A modern card component with gradient background and glassmorphism effect
Folder: gradient-card.jane-smith/
Example 3: Loading Spinner
title: Loading Spinner author: Mike Johnson github-username: mike-johnson tags: - loading - animation - ui description: Smooth rotating loading spinner with customizable colors
Folder: loading-spinner.mike-johnson/
💡 Key Points
- • All fields are required
- • Use exactly 3 tags (no more, no less)
- • Tags must be from the approved list
- • github-username must match your folder name
- • Description should be one clear sentence
Thank you for helping us grow!
Your contribution helps build a stronger Swift community. Every snippet makes a difference!
Created with ❤️ by @luizmellodev
If you find this project helpful, consider supporting it:
Need help? Check the detailed guidelines above or open an issue on GitHub.