Skip to content

Props

Full reference for VueClientRecaptcha component props.

CSS import

Import the package styles: import 'vue-client-recaptcha/dist/vue-client-recaptcha.css'

PropTypeDefaultDescription
modelValuestring | null""User input to validate (use with v-model)
valuestring | null""Deprecated. Use modelValue or v-model instead
charsstringalphanumericCustom character set when charsPreset is "custom"
charsPreset"alphanumeric" | "numeric" | "letters" | "custom""alphanumeric"Character preset for captcha code
countnumber5Number of characters in captcha
hideLinesbooleanfalseHide distortion lines
customTextColorstring""Fixed text color (e.g. "#333")
textColorsstring[][]Array of colors for random text coloring
widthnumber | (p) => number(p) => p.count * 30Canvas width (number or function)
heightnumber50Canvas height in pixels
canvasClassstring""Additional CSS class for canvas element
iconstring"refresh"Icon type when icon slot is not used. Default shows a refresh-style icon. Use the icon slot for custom template or text.
captchaFontstring"bold 28px sans-serif"Canvas font for captcha text
hideRefreshIconbooleanfalseHide the refresh button
radiusnumber0Border radius in pixels
refreshLabelstring"Refresh captcha"A11y label for refresh button
canvasLabelstring"Captcha image"A11y label for canvas
theme"auto" | "light" | "dark""light"Theme mode
noiseDotsnumber0Number of noise dots (0 = off)
noiseLinesnumber-1Number of distortion lines (-1 = use count)
distortion"none" | "lines" | "dots" | "both""lines"Distortion type
audioEnabledbooleanfalseSpeak code for screen readers
simpleModebooleanfalseClean, straight-line text with single color

Character Presets

  • alphanumeric – Letters (a-z, A-Z) and digits (0-9)
  • numeric – Digits only (0-9)
  • letters – Letters only (a-z, A-Z)
  • custom – Use chars prop for custom character set

Width Function

When width is a function, it receives { count: number } and returns the canvas width:

vue
<VueClientRecaptcha :width="(p) => p.count * 35" />

CSS Variables

You can override these styles via CSS variables on the component or parent:

  • --vcr-bg – Background color
  • --vcr-icon-color – Icon color
  • --vcr-padding – Padding
  • --vcr-radius – Border radius