惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
B
Blog
P
Proofpoint News Feed
美团技术团队
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
有赞技术团队
有赞技术团队
小众软件
小众软件
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
罗磊的独立博客
L
LangChain Blog
GbyAI
GbyAI
腾讯CDC
T
The Blog of Author Tim Ferriss
Microsoft Security Blog
Microsoft Security Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
🚀 React-Form-Toaster 1.1.3 is here. Build powerful forms ...
Pawan Bisht · 2026-04-23 · via DEV Community

Pawan Bisht

🚀 React-Form-Toaster 1.1.3

Now faster, smarter, and more customizable than ever. Build powerful forms in React/Next.js with ease, flexibility, and clean UX baked right in.

Say hello to the latest version of React-Form-Toaster (1.1.3)! 🎉

We've made it even easier, faster, and more powerful with much stability to create dynamic forms in React — without writing repetitive code. Whether you're building a signup form, feedback tool, or a confirmation popup, this library has you covered.


🔥 What's New in 1.1.3?

  • File Upload — More keys for better file upload with new validation!
  • Password Toggle — Beautiful default UI with full customization; use any icon library by just declaring it (Show & Hide).
  • Confirmation Modals — Easy-to-integrate confirmation messages with flexible buttons.
  • Radio & Checkbox — Checkbox for multiselect and radio support too.
  • Super Fast Setup — Just plug, play, and render your form!

⚙️ Quick Installation

Use npm or yarn to install:

npm install --save react-form-toaster
# or
yarn add react-form-toaster

Enter fullscreen mode Exit fullscreen mode


🧩 How to Use It

1. Import and Setup

import Formbox from "react-form-toaster";
import "react-form-toaster/dist/dist/tailwind.css";

Enter fullscreen mode Exit fullscreen mode

2. Basic User Form Example

import Formbox from "react-form-toaster";
import "react-form-toaster/dist/dist/tailwind.css";

<Formbox
  className={[
    "bg-gray-200 border-1 max-w-xl border-gray-100 rounded-lg shadow-md",
  ]}
  formtoogle={setfirstform}
  validationSchema={validationSchema}
  formtitle={[
    {
      title: "Form-Builder",
      className: ["text-2xl font-bold text-black "],
    },
  ]}
  textfield={[
    {
      name: "firstname",
      placeholder: "Enter your Firstname...",
      label: "FirstName",
      required: true,
      type: "text",
    },
    {
      name: "password",
      placeholder: "Enter your password...",
      label: "Password",
      type: "password",
      required: true,
      passwordToggle: true,
      icon: { show: Eye, hide: EyeOff },
    },
    {
      name: "search",
      placeholder: "Search your profession...",
      label: "Search",
      type: "search",
    },
    {
      name: "age",
      placeholder: "Enter your age...",
      label: "Age",
      type: "number",
      required: true,
    },
    {
      name: "marritalStatus?",
      label: "Marital Status",
      type: "checkbox",
      checklimit: 1,
      required: true,
      options: [
        { label: "Married", value: "married" },
        { label: "Unmarried", value: "unmarried" },
        { label: "other", value: "other" },
      ],
    },
    {
      name: "file",
      placeholder: "Upload your Image",
      label: "File",
      type: "file",
      arialabel: "File",
      maxFiles: 2,
      selectlabel: "Select File pdf or image",
      accept: ".pdf, image/*",
      className: [
        "border-2 border-dotted border-gray-400 p-2 rounded-lg bg-gray-100",
      ],
    },
  ]}
  buttons={[
    {
      name: "Reset Button",
      type: "reset",
      arialabel: "reset_button",
      tooltip: "Reset Button",
    },
    {
      name: "Submit",
      type: "submit",
      arialabel: "Submit_button",
      tooltip: "Submit Button",
      function: handlesubmit,
      loader: {
        loader: loader,
      },
    },
  ]}
  validationSchema={validationSchema}
/>

Enter fullscreen mode Exit fullscreen mode

3. Submit Handler

const handlesubmit = (data: any, e: React.MouseEvent) => {
  e.preventDefault();
  console.log(data);
};

Enter fullscreen mode Exit fullscreen mode

4. Zod Validation Schema

const validationSchema = z.object({
  firstname: z.string().min(4, { message: "First name must be at least 4 characters" }),
  age: z.number().min(18, { message: "You must be at least 18 years old" })
});

Enter fullscreen mode Exit fullscreen mode


🔍 Overview of Main Component Props

Formbox Component

Prop Description
formtoogle Toggle function for form visibility
formtitle Title array for form headings
textfield Array of input field definitions
buttons Submit, reset, or custom button configurations
message Message block for confirmation dialogs
validationSchema Zod schema for validation
className Custom styles for layout and design

TextField Options

name, placeholder, label, type, required, arialabel, passwordToggle, icon, checklimit, options

File Upload Support

Add number, accept, selectlabel, className, maxFiles, and arialabel for custom file uploads.

Buttons

Add number, type, label, function, className, arialabel, tooltip, loader.

Control labels, click behavior, classes, and accessibility with full flexibility.


🙌 Join the Community

If you found this helpful, consider giving the GitHub repo a ⭐!

Contributions are always welcome — feel free to open issues, suggest improvements, or share your feedback to help make it even better.