A React library for cookie consent management compliant with Brazil's LGPD.
Installation • Basic Usage • 📚 Quickstart • Documentation • Contributing
Start here: follow the Quickstart guide (QUICKSTART.en.md) for step-by-step setup, TypeScript examples, props summary and MUI integration — recommended for new users.
npm install react-lgpd-consent @mui/material @emotion/react @emotion/styled js-cookie
Peer dependencies: react
, react-dom
, @mui/material
and js-cookie
.
Wrap your app with ConsentProvider
(minimal example):
import { ConsentProvider } from 'react-lgpd-consent'
export default function App() {
return (
<ConsentProvider categories={{ enabledCategories: ['analytics'] }}>
<YourApp />
</ConsentProvider>
)
}
DEVELOPMENT.md
to submit a PR.MIT — see the LICENSE
file.