Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-faq-generator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-faq-generator

A simple FAQ section generator in react applications

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-faq-generator

This repository contains a simple Frequently Asked Questions Section generator in React applications.

Installation

NPM

npm install react-faq-generator

YARN

yarn add react-faq-generator

Usage

import React from 'react'
import FAQGenerator from 'react-faq-generator'

const MyApp = () => {
	const data = [
		{
			id: 1,
			question: 'What was the main cause of World War I?',
			answer: 'World War I began after the assassination of Austrian archduke Franz Ferdinand by South Slav nationalist Gavrilo Princip on June 28, 1914.'
		},
		{
			id: 2,
			question: 'What countries fought in World War I?',
			answer: 'The war pitted the Central Powers (mainly Germany, Austria-Hungary, and Turkey) against the Allies (mainly France, Great Britain, Russia, Italy, Japan, and, from 1917, the United States).'
		},
		{
			id: 3,
			question: 'How was trench warfare used in World War I?',
			answer: 'The widespread use of machine guns and rapid-firing artillery pieces on the Western Front meant that any exposed soldier was vulnerable.'
		}
	]

	return (
		<FAQGenerator data={data} />
	)
}

export default MyApp

Live Demo

You can check the live demo here

Properties

PropertyTypeDefault ValueDescription
dataarray of objectnullAn array of questions & answers to be displayed. This prop must be passed.
titlestring'FAQ'The title of the FAQ section.
classNamestring''The name of the class containing customm css rules to be applied.
darkModebooleanfalseIf in dark mode then pass this prop as true.

License

MIT © alim1496

Keywords

FAQs

Package last updated on 15 Aug 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc