Sleek Form

Sleek Form

  • Docs

›Components

Components

  • Text
  • Rating
  • Scale
  • Select
  • Question
  • Summary
  • Welcome
  • Radio
  • SleekFormThemProvider

Scale

Scale fields let users to choose a scale.

Scale Field

The ScaleField component is a complete form control.

Usage

<Scale
  values={[
    { label: 'dark', value: 'dark' },
    { label: 'wheatish', value: 'wheatish', number: 3 },
    { value: 'wheatish brown', number: 7 },
    { value: 'bright', number: 11 },
    { label: 'very fair', value: 'very fair', number: 15 },
  ]}
  defaultValue={{ value: 'bright', number: 11 }}
  onChange={(value) => console.log(value)}
/>

Types

type ScaleValueType = { label?: string; value: string; number?: number };

Props

The ScaleField supports the following properties

PropsDescriptionTypeDefault
onChange?onChange callback(value: ScaleValueType) => void;None
value?Current selected rating.ScaleValueTypeNone
defaultValue?Initial selected rating.ScaleValueTypeNone
valuesarray of values of the scaleArrayNone

Demo

You can view a live demo of ScaleField in our sandbox

← RatingSelect →
  • Scale Field
  • Usage
  • Types
  • Props
  • Demo
Sleek Form
Docs
Getting Started
More
GitHub
Copyright © 2020 Fresalabs