explaingit

xmartlabs/eureka

11,820SwiftAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A Swift library for building iOS forms, text fields, date pickers, toggles, dropdowns, by declaring sections and rows rather than writing low-level UIKit table view code. Handles rendering, keyboard navigation, and validation automatically.

Mindmap

mindmap
  root((eureka))
    What it does
      iOS form builder
      Row-based UI
      Validation
    Row types
      Text fields
      Date pickers
      Toggles selectors
    Features
      Conditional rows
      Swipe actions
      Custom row types
    Tech Stack
      Swift
      CocoaPods
      Carthage
    Use Cases
      Settings screens
      Signup forms
      Profile editors
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a multi-field settings screen in an iOS app with text input, toggles, and a date picker without writing table view boilerplate.

USE CASE 2

Create a form where certain fields only appear when the user selects a specific option, using conditional show and hide rules.

USE CASE 3

Add inline validation to a signup form so per-field error messages appear before the user submits.

USE CASE 4

Implement a dynamic list where users can add or remove entries using a multi-value section.

Tech stack

SwiftCocoaPodsCarthageXcode

Getting it running

Difficulty · easy Time to first run · 30min

Requires Xcode 11 or later and Swift 5.0 or later, installed via CocoaPods or Carthage.

Use freely for any purpose, including commercial apps, as long as you retain the copyright notice.

In plain English

Eureka is a Swift library for building forms in iOS apps. A form in this context means the kind of screen you see when an app asks you to fill in your name, pick a date, toggle a setting, or choose from a list. Instead of writing all that from scratch using Apple's UI components directly, Eureka gives you a structured way to describe what fields you want and how they should behave. You build a form by creating sections and adding rows to them. Each row type corresponds to a kind of input: text fields, phone number fields, date pickers, email addresses, password boxes, switches, and more. You use short operator syntax to assemble them, chaining sections and rows together in a readable way. The library takes care of rendering the table view, handling keyboard navigation between fields, and collecting all the values you need when the user is done. Rows can show or hide dynamically based on values in other rows, which is useful for forms where some fields only apply in certain situations. Sections can include validation rules so the form can tell the user what needs to be fixed before proceeding. You can also add swipe actions to rows, customize section headers and footers, and build multi-value sections where a user can add or remove entries from a list. If the built-in row types do not cover your needs, the library supports creating custom row types. You can define a custom cell appearance, build rows that expand inline when tapped, or create rows that present a separate view controller for more complex input. Eureka is distributed under the MIT license and can be added to a project through CocoaPods or Carthage. It requires Xcode 11 or later and Swift 5.0 or later. An example project is included in the repository showing most features in action. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Build a Swift iOS settings screen using Eureka with sections for Profile (name, email, phone), Preferences (notifications toggle, theme picker), and a logout button row.
Prompt 2
Write Eureka code that shows a company name text field only when the user picks Business from a SelectorRow for account type.
Prompt 3
Add validation to a Eureka text field row that shows an inline error if the user enters an invalid email address when moving to the next field.
Prompt 4
Create a custom Eureka row in Swift that displays a color swatch and opens a color picker view controller when tapped.
Prompt 5
Set up a Eureka MultivaluedSection where users can add and remove phone numbers from a list, with a tap-to-add button at the bottom.
Open on GitHub → Explain another repo

← xmartlabs on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.