CYBERCN
CyberCN UI
Components

Forms

Cyber-themed form controls for text entry, selection, submission, and grouped field layout.

Forms

CyberCN form components keep the API close to native HTML controls while replacing the visual treatment with the library's clipped, high-contrast style system.

Install

npx shadcn@latest add @cybercn/cyber-form @cybercn/cyber-button

Import

import {
  CyberForm,
  CyberFieldset,
  CyberInput,
  CyberSelect,
  CyberSelection,
  CyberTextarea,
} from "@/components/ui/cybercn/form";
import { Button } from "@/components/ui/cybercn/button";

Usage Example

import {
  CyberForm,
  CyberFieldset,
  CyberInput,
  CyberSelect,
  CyberSelection,
  CyberTextarea,
} from "@/components/ui/cybercn/form";
import { Button } from "@/components/ui/cybercn/button";

export function IntakeForm() {
  return (
    <CyberForm className="max-w-xl space-y-5">
      <CyberFieldset>
        <CyberInput name="alias" placeholder="USER_ALIAS" />
        <CyberInput name="scanDate" type="date" />
      </CyberFieldset>

      <CyberTextarea name="manifesto" rows={4} placeholder="SYSTEM_MANIFESTO" />

      <CyberSelect name="district" defaultValue="HAYWOOD">
        <option value="WATSON">WATSON</option>
        <option value="HAYWOOD">HAYWOOD</option>
        <option value="PACIFICA">PACIFICA</option>
      </CyberSelect>

      <CyberSelection
        type="checkbox"
        name="encryptUplink"
        label="ENCRYPT_DATA_UPLINK"
      />

      <Button type="submit">Initialize Handshake</Button>
    </CyberForm>
  );
}

CyberForm

PropTypeDefaultNotes
native form propsFormHTMLAttributes<HTMLFormElement>-Supports action, onSubmit, method, className, and more.

CyberForm is a thin wrapper that adds space-y-4 by default and forwards the rest of the native form API.

CyberInput

PropTypeDefaultNotes
native input propsComponentProps<"input">-Accepts the full native input surface.
typenative HTML input type"text"Defaults to text, but works with date, file, number, password, and more.

Best fit for single-line text fields, temporal inputs, upload controls, and numeric entries.

CyberTextarea

PropTypeDefaultNotes
native textarea propsComponentProps<"textarea">-Includes rows, placeholder, value, and onChange.

Adds cyber-input, a larger minimum height, and the textarea-specific clipped frame class.

CyberSelect

PropTypeDefaultNotes
native select propsComponentProps<"select">-Accepts normal select attributes and events.

Applies the CyberCN input frame with select-specific clipping and appearance-none.

CyberSelection

PropTypeDefaultNotes
type"checkbox" | "radio"requiredChooses the rendered control style.
labelstringrequiredRendered inline after the input control.
native input propsOmit<ComponentProps<"input">, "type">-Includes name, value, checked, onChange, and disabled.

Use this for radios and checkboxes where the visible label should stay attached to the control.

CyberFieldset

PropTypeDefaultNotes
classNamestring-Useful for grid layout or spacing overrides.
childrenReact.ReactNoderequiredUsually a cluster of related form controls.

CyberFieldset is helpful for grouping date/time pairs, security fields, or multi-input identity blocks.

On this page