Introducing Nuvyx UI v1.0.0

Docs
Keyboard

Keyboard

A customizable interactive keyboard component with various themes, layouts, and animation options.

Esc
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
`
1
2
3
4
5
6
7
8
9
0
-
=
Backspace
Tab
Q
W
E
R
T
Y
U
I
O
P
[
]
\
Caps
A
S
D
F
G
H
J
K
L
;
'
Enter
Shift
Z
X
C
V
B
N
M
,
.
/
Shift
Ctrl
Alt
Space
Alt
Ctrl

Installation

Examples

Esc
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
`
1
2
3
4
5
6
7
8
9
0
-
=
Backspace
Tab
Q
W
E
R
T
Y
U
I
O
P
[
]
\
Caps
A
S
D
F
G
H
J
K
L
;
'
Enter
Shift
Z
X
C
V
B
N
M
,
.
/
Shift
Ctrl
Alt
Space
Alt
Ctrl

Usage

import { Keyboard } from "@/components/ui/keyboard";
// Basic usage with default cyberpunk theme
<Keyboard />
 
// Custom theme with different layout
<Keyboard
  theme="mechanical"
  layout="compact"
  showFunctionKeys={false}
/>
 
// Active keys highlighting
<Keyboard
  activeKeys={["KeyW", "KeyA", "KeyS", "KeyD"]}
  activeKeyGlowColor="#ff5555"
  activeKeyGlowIntensity={0.9}
/>
 
// Custom styling and event handlers
<Keyboard
  theme="neon"
  keyColor="#1a1a2e"
  keyTextColor="#e6e6e6"
  accentColor="#ff2a6d"
  onKeyPress={(code, key) => console.log(`Pressed: ${code}, ${key}`)}
  onKeyRelease={(code, key) => console.log(`Released: ${code}, ${key}`)}
/>

Props

PropTypeDefaultDescription
layoutstring"standard"Keyboard layout (standard or compact)
showFunctionKeysbooleantrueShow function keys (F1-F12) row
showNavigationClusterbooleantrueShow navigation key cluster
activeKeysstring[][]Array of key codes to highlight as active
activeKeyGlowColorstring"#6366f1"Glow color for active keys
activeKeyGlowIntensitynumber0.8Intensity of glow effect for active keys (0-1)
themestring"cyberpunk"Keyboard theme (cyberpunk, minimal, retro, mechanical, neon, pastel)
keyColorstring"#2a2a2a"Base color for keyboard keys
keyTextColorstring"#ffffff"Text color for keyboard keys
accentColorstring"#6366f1"Accent color for special keys and highlights
keyPressedColorstring"#333333"Color for pressed keys
keyPressAnimationDurationnumber150Duration of key press animation in milliseconds
onKeyPressfunction() => {}Callback function when a key is pressed (code: string, key?: string) => void
onKeyReleasefunction() => {}Callback function when a key is released (code: string, key?: string) => void
classNamestring""Additional CSS classes to apply
allowPhysicalKeyboardbooleantrueAllow physical keyboard integration
perspectivenumber1000CSS perspective value for 3D effect
rotateXnumber10X-axis rotation angle in degrees