Components

Explore 69 CyberSpec React component demos by category, with code examples and shadcn installation commands.

Installation

Use a React 19 project with shadcn configured. Render the installed components inside the Cyber root, and import your global stylesheet in the app entry point.

bunx --bun shadcn@latest registry add '@cyberspec-ui=https://www.cyberspec.dev/r/{name}.json'
bunx --bun shadcn@latest add @cyberspec-ui/cyber @cyberspec-ui/button

Actions

  • Button — A cut-corner button with a raised tab, five tones, and a press flash. Enable the cipher prop to scramble the label and briefly tear the frame on hover.
  • Button group — Keys joined in one strip, horizontal or vertical, with hold-to-repeat.
  • Toggle — A latching key that stays lit while pressed. Set cipher to decode its label when switched on.
  • Toggle group — Toggles that share one value, one or several at a time.
  • Toolbar — Keys, toggles and separators in one bar, moved through with arrow keys.
  • Key hint — An input hint: a key glyph and what it does, optionally pressable.

Fields

  • Text field — A labelled text input in a cut frame, with a hint, an error and an optional icon.
  • Textarea — A labelled multi-line input with a character count.
  • Password input — A password field with a key to show or hide it.
  • OTP input — One cut cell per character of a code, with a blinking caret in the active one.
  • Number stepper — A value on a readout between minus and plus keys, with MIN and MAX tags.
  • Fieldset — A spined frame grouping several fields under a legend.

Choices

  • Switch — A block that slides across a cut track and lights, with its state printed beside it.
  • Checkbox — A cut box that fills and marks when checked, with an indeterminate state.
  • Radio group — Options where one is chosen, each with a diamond indicator.
  • Segmented control — A row of segments with an indicator that slides to the choice.
  • Slider — A ticked track with a cut thumb and a value readout, single or range.
  • Rating — A level picked from a row of diamond pips.
  • Choice list — Replies to choose from: rows in the signal color, the chosen one a solid yellow bar.

Pickers

  • Select — A labelled trigger that opens a list of options to choose from.
  • Combobox — A text control that filters a list of options as you type.
  • Item list — An always-visible list of rows in columns, the selected row a solid signal bar.
  • Command palette — A searchable list of commands behind a prompt, in a dialog.
  • Tree — A hierarchy with connector lines and branches that open.
  • Calendar — A month grid with today marked and the chosen day lit.
  • Date picker — A date field with a calendar that opens beside it.

Navigation

  • Tabs — Tabs over panels with a sliding indicator, or as cut keys. Set cipher on key tabs to briefly split the selected key’s edge.
  • Side tabs — Icon keys stacked down the edge, with a panel beside them.
  • Context menu — An area that opens a menu on right-click, a long press, or the keyboard.

Overlays

  • Dialog — A modal panel on a spined frame that tears in over a dimmed page, with its answers on keys below.
  • Alert dialog — A flagged confirmation that has to be answered, and that an agent has to ask a person about.
  • Drawer — A sheet that glitches in and out at the edge of the page. Drag it toward that edge to dismiss it.
  • Popover — A key that opens a framed surface beside it, with a title, description and body.
  • Tooltip — A small cut label that appears on hover or focus.
  • Hover card — A name that previews a small dossier on hover or focus.
  • Toast — Keys that raise a notification in each tone.

Layout

  • Panel — The kit's container: a frame with a spine or a title bar, a heading, micro-print and a body.
  • Card — A content card with a scanlined media slot. Set cipher on an interactive card to decode its title on hover.
  • Accordion — Stacked sections that open from numbered headings, each with a glyph that turns.
  • Collapsible — One section behind a key that shows and hides it.
  • Resizable — Panels split by a handle that drags or steps with keys.
  • Scroll area — A scrolling region with a thin scrollbar and edge indicators.
  • Separator — A rule with tick marks, plain, labelled or vertical.

Data

  • Alert — An inline notice on a spined frame: info, success, warning or danger, each with its own glyph.
  • Badge — A small cut label in seven tones, with count and status variants.
  • Avatar — A portrait in a cut frame, with initials over a generated scanline field when there's no image.
  • Progress — A segmented bar with a percentage readout, and an indeterminate state.
  • Meter — A segmented gauge with thresholds that change its tone and print a word.
  • Skeleton — Placeholder lines and blocks for content that's loading.
  • Data table — Rows with selection, sortable columns, status badges and a menu per row.
  • Feed — Dated events in order on a vertical rule: who did what, and when.
  • Code block — Highlighted code with line numbers, a filename tab and a copy key. No highlighting dependency.

HUD

  • Glitch text — Text that decodes itself into place and tears for a moment, with a stable copy for screen readers.
  • Readout — A large numeral with a unit and a label that counts to its new value when it changes.
  • Hex stat — An attribute as a hexagon holding an icon, a value and a name, and a honeycomb to lay several out.
  • Item slot — A gear tile with a rarity spine, mod sockets, a count and an empty state. Set cipher to briefly split its edge on selection.
  • Signal graph — A compact live graph, as a trace or a spectrum, with a text summary.
  • Loader — A boot screen in miniature: a mark, a thin progress bar, a percentage and a cycling status line.
  • Holo card — A surface that tilts toward the pointer in 3D, with a sheen and layers at different depths.
  • Reticle — A lock-on bracket that snaps onto whatever it wraps when hovered, focused or active.
  • Micro-print — The printed decoration around frames: micro-print lines, barcodes, rulers, data streams and corner brackets.
  • Terminal — A console log with tagged lines, a prompt with history, and a follow-the-end scroll.
  • Map — A flat map or rotatable globe with selectable markers, routes, and a bundled world basemap.

View as Markdown