Blossom UI

Survey

Emoji rating survey component that reports the chosen value and lets the user change or close it.

How to use it

Run npx @blossomui/react add survey, or copy src/components/UI/Survey/Survey.tsx into your React project and import it.

import { defaultOptions, Survey } from './components/ui/Survey'

Props

SurveyOption

PropTypeDescription
value (required)number
emoji (required)string
label (required)string

SurveyLabels

PropTypeDescription
answered (required)string
change (required)string
close (required)string

SurveyProps

PropTypeDescription
labelsPartial<SurveyLabels>Texts of the component. Pass only the ones you want to change, for example to translate it.
colorstringAccent color of this component: any CSS color. Without it the component uses `--blossom-accent`, which is pink by default.
question (required)string
optionsSurveyOption[]
onSubmit(value: number) => voidCalled with the chosen value when the user answers.
thanksstringMessage shown after answering.

Getting started

  • Introduction
  • Installation
  • Changelog

Customization

  • Colors
  • Brand color
  • Texts and translation

Components

  • Accordion
  • Alert dialog
  • Alerts
  • Avatar
  • Badges
  • Banner
  • Breadcrumb
  • Buttons
  • Calendar
  • Cards
  • Carousel
  • Charts
  • Chip input
  • Collapsible
  • Color picker
  • Combobox
  • Command palette
  • Context menu
  • Copy button
  • Date picker
  • Drawer
  • Dropdown
  • Empty state
  • File upload
  • Footer
  • Forms
  • Hover card
  • Jumbotron
  • KBD
  • Menubar
  • Modal
  • Navbar
  • Navigation menu
  • Number input
  • OTP input
  • Pagination
  • Popover
  • Pricing
  • Progress
  • Rating
  • Resizable panels
  • Scroll area
  • Segmented control
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Spinners
  • Stats
  • Stepper
  • Survey
  • Table
  • Tabs
  • Time picker
  • Timeline
  • Timer button
  • Toasts
  • Tooltip
  • Transfer list
  • Tree