not-tinder-ui

not-tinder-ui

  • Docs

›Components

Get started

  • Introduction

Components

  • AddRemoveImage
  • Avatar
  • Card
  • ChatBubble
  • ChatInput
  • CustomSwitch
  • LabeledInput
  • LabeledRadioButtons
  • MediaCard
  • SwipeableWrapper

LabeledInput

Simple input with it's label

Usage

Single line:

LabeledInput_single_example

import React, { useState } from 'react';
import LabeledInput from './LabeledInput';

const SampleLabeledInput = () => {
  const [value, setValue] = useState("");
  return <LabeledInput
    label='Name:'
    value={value}
    onTextChange={setValue}
  />

}

export default SampleLabeledInput

MultiLine:

LabeledInput_multi_example

import React, { useState } from 'react';
import { Card, LabeledInput } from 'nottinderuikit';

const MultilineSampleLabeledInput = () => {
  const [value, setValue] = useState("")
  return <Card>
    <LabeledInput
      label="Name:"
      value={value}
      onTextChange={setValue}
      lines={4}
      max={140}
    />
  </Card>
}

export default MultilineSampleLabeledInput



Props

  • label
  • onTextChange
  • value
  • lines
  • max

Reference

label

Label of the input.

TypeDefaultRequired
stringundefinedtrue

onTextChange

Function called when the when the text on the input changes.

TypeDefaultRequired
function: (nextValue: string) => voidundefinedtrue

value

Value of the input.

TypeDefaultRequired
stringundefinedtrue

lines

Number of lines of the input.

TypeDefaultRequired
numberundefinedfalse

max

Max length of input's value

TypeDefaultRequired
numberundefinedfalse
← CustomSwitchLabeledRadioButtons →
  • Usage
    • Single line:
    • MultiLine:
  • Props
  • Reference
    • label
    • onTextChange
    • value
    • lines
    • max
not-tinder-ui
Docs
Getting Started (or other categories)
More
GitHubStar
Facebook Open Source