1.0.0 • Published 9 months ago

react-poller v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

React Poll Widget

A customizable React component for creating interactive polls with visual results displayed as charts. This package aims to provide a user-friendly experience for gathering opinions and feedback.

Features

  • Easy-to-use polling widget
  • Displays voting results using interactive chart
  • Incremental improvements and updates as I go!

Working on v2

  • CSS styling
  • More customizations!

Installation

You can install the package via npm:

npm install react-poller

Usage

import React from 'react';
import {PollWidget} from 'react-poller';

const App = () => {
  const question = "What is your favorite color?";
  const options = ["Red", "Green", "Blue"];

  return (
    <div>
      <PollWidget question={question} options={options} />
    </div>
  );
};

export default App;

Props

PropTypeDescription
questionstringThe question to be displayed for the poll.
optionsarrayAn array of strings representing the poll options.