npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cyberform-ui

v1.0.10

Published

A futuristic, cyberpunk-inspired React component library

Readme

Cyberform-UI — Cyberpunk UI + Form Security

A compact React library combining cyberpunk-inspired UI components with built-in form hardening helpers.
Provides glowing buttons, inputs, modals, and cards — plus a form wrapper (CFForm) that adds honeypot fields, throttling, lightweight validation, and CSRF token passthrough.


📦 Exports

From src/index.ts the package exports:

  • CFButton
  • CFCard
  • CFInput
  • CFSwitch
  • CFModal
  • CFForm

⚡ Installation

npm i cyberform-ui
# peer deps
npm i react react-dom
  • Auto-includes CSS for each component (no manual import needed)
  • Supports Vite, Next.js, CRA, etc.
  • Peer deps: react >= 17, react-dom >= 17

🎨 UI Components

1. CFButton

Cyberpunk button with neon glow, size variants, and customizable colors.

import { CFButton } from "cyberform-ui";

<CFButton variant="primary" size="md" onClick={() => alert("Clicked!")}>
  Click Me
</CFButton>

Props:

  • variant: "primary" | "secondary" | "danger" | "success" | "warning"
  • size: "xs" | "sm" | "md" | "lg" | "xl"
  • Visual overrides: color, hoverColor, glowColor, textColor, fontSize, innerBg, innerBgHover, width, height
  • Supports all native <button> props

2. CFCard

Neon-framed container for content blocks.

import { CFCard } from "cyberform-ui";

<CFCard variant="secondary" size="lg">
  <h2>Card Title</h2>
  <p>Card body text goes here.</p>
</CFCard>

Props:

  • variant: "primary" | "secondary" | "danger" | "success" | "warning"
  • size: "sm" | "md" | "lg" | "xl"
  • Visual overrides: color, hoverColor, glowColor, textColor, innerBg, innerBgHover
  • shape: "featurastic" | "default"
  • className, style

3. CFInput

Styled text input with floating labels, validation hooks, and optional password strength.

import { CFInput } from "cyberform-ui";

<CFInput
  label="Email"
  type="email"
  placeholder="[email protected]"
/>

Props:

  • variant: "primary" | "secondary" | "success" | "warning" | "danger"
  • cfSize: "sm" | "md" | "lg" | "xl"
  • Labeling: label, hideLabel, labelColor, labelShrinkScale, labelOffsetY
  • Container: containerClassName
  • Styling: accentColor, bgColor, borderColor, clipPath, glowBlur, glowOpacity, showCorners
  • Form state: invalid, disabled
  • Special: showPasswordStrength?: boolean
  • All native input props (except size, replaced by cfSize)

4. CFSwitch

Cyberpunk toggle switch with glowing animation.

import { CFSwitch } from "cyberform-ui";

<CFSwitch checked={isOn} onChange={setOn} />

Props:

  • checked: boolean
  • onChange: (checked: boolean) => void

⚠ Accessibility caveat: Missing role="switch" and full keyboard navigation.


5. CFModal

Dialog component with neon backdrop and header.

import { CFModal } from "cyberform-ui";

<CFModal isOpen={open} onClose={() => setOpen(false)} title="My Modal">
  <p>Modal content here</p>
</CFModal>

Props:

  • isOpen: boolean
  • onClose: () => void
  • title?: string
  • variant, size, color, glowColor, textColor, innerBg, innerBgHover, maxWidth
  • children, footer?, className?

⚠ Accessibility caveat: Missing focus trap and Escape key handler.


🛡 Form Security Features

6. CFForm

Form wrapper that adds basic security (honeypot, throttling, validators, password strength).

import { CFForm, CFInput, CFButton } from "cyberform-ui";

<CFForm
  onSecureSubmit={(data) => console.log("secure payload", data)}
  onSubmitFailed={(err) => console.warn("failed", err)}
>
  <CFInput name="email" type="email" label="Email" />
  <CFInput name="password" type="password" label="Password" />
  <CFButton type="submit" variant="primary">Register</CFButton>
</CFForm>

Props:

  • onSecureSubmit?: (data: Record<string, any>) => void | Promise<void>
  • onSubmitFailed?: (err: { reason: string; data?: any }) => void | Promise<void>
  • realtimeValidation?: boolean (default true)
  • honeypotName?: string (default "hp")
  • csrfToken?: string
  • throttleMs?: number (default 3000)
  • showPasswordStrength?: boolean (default true)
  • All native <form> props (noValidate set internally)

Built-in protections:

  • Honeypot hidden field
  • Throttle between submits
  • Simple validators: email / password / text
  • Password strength scoring (heuristic 0–4)
  • CSRF token passthrough (backend must enforce)

Limitations:

  • Client-side only, bypassable with devtools
  • No XSS sanitization or SQL injection protection
  • Must pair with backend validation + rate limiting

🎨 Theming

  • Components accept color props (color, glowColor, textColor, etc.)
  • Styles are plain CSS (auto-applied per component)
  • Can override with style or className