Check out the live deployment of this repository: Dex Widget Demo
This project is a React application that integrates the OKX DEX Widget, providing a seamless and user-friendly interface for swapping and bridging tokens.
- Integration of the OKX DEX Widget
- Responsive and stylish UI
- Boilerplate application
- React
- TypeScript
- OKX DEX Widget (@okxweb3/dex-widget)
Before you begin, ensure you have met the following requirements:
- Node.js (v20 or later)
- npm (usually comes with Node.js)
-
Fork the Repository
- Click "Use Template" to fork this repl.
-
Install the dependencies
- In Replit, open the shell terminal and run the following command:
npm install
-
Run the project:
- Use the
Run
button provided by Replit to start the application. - Once the server starts, it will provide a webview window with the application running live.
- Use the
-
Clone the repository:
git clone https://github.com/Julian-dev28/dex-widget-demo.git
-
Navigate to the project directory:
cd okx-dex-widget-app
-
Install the dependencies:
npm install
-
Run the project:
npm run dev
This will start the development server. Open http://localhost:5173 to view it in your browser.
src/App.tsx
: The main application componentsrc/Navigation.tsx
: The navigation componentsrc/LandingPage.tsx
: The home page componentsrc/WidgetPage.tsx
: The page containing the OKX DEX Widgetsrc/index.css
: Global styles and theme variables
You can customize the application by modifying the following:
- Color scheme: Edit the CSS variables in
src/index.css
- Navigation items: Update the
navItems
array insrc/Navigation.tsx
- Widget parameters: Modify the
params
object insrc/WidgetPage.tsx
Contributions to this project are welcome. Please follow these steps:
- Fork the repository
- Create a new branch:
git checkout -b feature-branch-name
- Make your changes and commit them:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature-branch-name
- Create a pull request
This project is licensed under the MIT License - see the LICENSE.md file for details.
- OKX for providing the DEX Widget
- The React and TypeScript communities for their excellent documentation and support
If you have any questions or feedback, please open an issue in this repository. You can also contact us via the OKX OS Discord Channel.