Revel
GitHub
GitHub
  • Overview

    • Getting started
    • FAQ
    • Release notes
  • Foundations

    • Meet the standard
    • Accessibility
    • Internationalization
    • Information hierarchy
    • Speed
  • Design

    • Visual principles
    • Colors
    • Space
    • Icons
    • Typography
  • Design tokens
  • Style helpers
  • Content

    • Express your ideas
    • Actionable language
    • Inclusive and accessible language
    • Alternative text
    • Grammar and mechanics
      • Basics
      • Capitalization
      • Dates and units of measurement
      • Punctuation
  • Components

    • Alert
    • Avatar
    • Badge
    • Button
    • Button group
    • Checkbox
    • Date Input
      • dates
      • datetimes
      • ranges
    • Field group
    • File upload
    • Flex
    • Grid
    • Icon
    • Image
    • Input
    • Loader
    • Modal
    • Month picker
    • Pagination
    • Popper
    • Radio
    • Repeater
    • Select
    • Tabs
    • Tile
    • Toast
    • Toggle
  • Directives

    • Click outside
    • Tooltip

Input

The r-input is a versatile component designed for various types of user input, providing a seamless and customizable experience.

Usage

import { RInput } from '@rebilly/revel';

<r-input v-model="firstName" label="First name" />

Examples

input-simple.vue
input-disabled.vue
input-with-icon.vue
textarea-simple.vue
input-validation.vue

API

Props

NameTypeDefaultDescription
labelNullable, stringnull

Label for input

modelValueNullable, unionnull

Model value

validateNullable, ValidationStatenull

Validation object (Vuelidate)

showValidateMessagesbooleanfalse

Show validation messages

helpTextNullable, stringnull

Help text that displays below the input

multilinebooleanfalse

Multiline input

submitOnEnterbooleanfalse

Submit on enter

inputEventsRecord, string, unknown() => ({})

Input events

leftIconNullable, IconNamesnull

Displays an icon on the left side of the input

leftIconClickPointerbooleanfalse

Enables or disables the pointer cursor and click event on the left icon

rightIconNullable, IconNamesnull

Displays an icon on the right side of the input

rightIconClickPointerbooleanfalse

Enables or disables the pointer cursor and click event on the right icon

leftIconSpinningbooleanfalse

Displays a spinning icon on the left side of the input

rightIconSpinningbooleanfalse

Displays a spinning icon on the right side of the input

leftLabelNullable, stringnull

Displays a label on the left side of the input

rightLabelNullable, stringnull

Displays a label on the right side of the input

passwordbooleanfalse

Changes the input type to password

numericbooleanfalse

Changes the input type to number

namestring() => nanoid()

Adds a name attribute to the input

rowsunion, string, number'1'

Rows for textarea input

autoFocusbooleanfalse

Input autofocus

autoHighlightbooleanfalse

Input auto highlight

autoHighlightOnFocusbooleanfalse

Input auto highlight on focus

maxLengthunion, number, string, undefinedundefined

Displays the number of characters left

autoResizebooleanfalse

Enables or disables the auto resizing of the textarea

autoCompletestring''

Enables or disables the autocomplete feature

Slots

NameDescription
right-button

Additional action button content

Events

NameDescription
focus
click
blur
key-press
key-down
key-submit
update:modelValue
left-icon-click
right-icon-click
Edit this page
Last Updated: 1/30/25, 6:26 PM
Contributors: Peyman Eskandari, Alberto Gualis, John Hannagan, Weetbix, Cesar Level
Prev
Image
Next
Loader