Skip to content
Forms

MoodSlider

Your mood is the weather. A cut-paper sun climbs out of the rain as you drag up, the clouds part, the hills turn green and its face comes round to a smile. Built on a native range input.

Download
  • React
  • Tailwind CSS v4
  • motion

Props

NameTypeDefaultWhat it does
labelstring"How is today?"The question, shown on the sky.
moodsstring[]5 moodsMood names, lowest first.
valuenumber-Controlled value, 1 to the number of moods.
defaultValuenumbermiddle moodUncontrolled start value.
onChange(value: number, mood: string) => void-Called with the new value and its mood name.
namestring-Form field name. Sends the number.
classNamestring"w-full max-w-lg"Set the width here. Everything scales with it.