0.0.10 • Published 11 months ago

react-radio-pie v0.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

React Radio Pie (react-radio-pie)

npm.io

npm version

Customizable accessible radio button elements in a circular layout suitable for pie chart visualization in React.

Installation

yarn

yarn add react-radio-pie

npm

npm install react-radio-pie

pnpm

pnpm install react-radio-pie

Basic example

import ReactRadioPie, {
	ReactRadioPieProvider,
	ReactRadioPieCSS,
} from 'react-radio-pie';

// load css file
ReactRadioPieCSS();

const choices = [
	{
		id: 'f21a4d9c',
		content: 'Never',
	},
	{
		id: '37e1dfe9',
		content: 'Rarely (once a month or less)',
	},
	{
		id: '9dcbf383',
		content: 'Occasionally (a few times a month)',
	},
	{
		id: 'a550db7f',
		content: 'Sometimes (once a week or so)',
	},
	{
		id: '3d6bba3a',
		content: 'Often (a few times a week)',
	},
	{
		id: '2b2d3b03',
		content: 'Very often (almost every day)',
	},
];

export default function App() {
	return (
		<ReactRadioPieProvider>
			<ReactRadioPie id='exampleRadioPie' choices={choices} />
		</ReactRadioPieProvider>
	);
}

More examples

Storybook

License

MIT

0.0.10

11 months ago

0.0.9

11 months ago

0.0.8

11 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago