A Chrome browser extension that enhances Flowbite component documentation by adding a "Copy JSX" button to easily convert HTML code snippets into JSX format.
The extension adds a "Copy JSX" button to each code snippet on Flowbite documentation pages. The button seamlessly integrates with Flowbite's design system, appearing alongside the existing copy buttons.
When you click the "Copy JSX" button, the extension automatically transforms Flowbite's HTML code into JSX format. The transformation handles:
- Converting HTML class attributes to JSX className
- Preserving proper indentation and code structure
- Maintaining all component functionality
- Ensuring the code is ready to use in React applications
- Adds a "Copy JSX" button next to code snippets on Flowbite documentation pages
- Seamlessly integrates with the existing Flowbite documentation UI
- Works on all component documentation pages (
https://flowbite.com/docs/components/*
)
This extension is not yet published to the Chrome Web Store. To use it in development mode:
-
Clone this repository:
git clone https://github.com/dimuthadithya/JSX.git
-
Open Chrome and navigate to
chrome://extensions/
-
Enable "Developer mode" in the top right corner
-
Click "Load unpacked" and select the folder containing this extension
manifest.json
- Extension configuration and permissionscontent.js
- Content script that injects the "Copy JSX" button into Flowbite documentation pages
The extension uses Manifest V3 and injects a content script that runs on Flowbite component documentation pages. The script adds a "Copy JSX" button that matches Flowbite's UI design.
This project is open source. Feel free to use, modify, and distribute as needed.
Created by dimuthadithya