Socket
Socket
Sign inDemoInstall

react-radio-pie

Package Overview
Dependencies
6
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-radio-pie

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


Version published
Weekly downloads
12
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

React Radio Pie (react-radio-pie)

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

Keywords

FAQs

Last updated on 30 Jun 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc