react-poller
v1.0.0
Published
A React poll widget with a chart for displaying voting results.
Downloads
73
Readme
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
| Prop | Type | Description |
| ------------- |:-------------:| -----:|
| question
| string | The question to be displayed for the poll.|
| options
| array | An array of strings representing the poll options.|