Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to use React 95 in the React project that was built by Vite? #394

TomBrown114514 started this conversation in General
Discussion options

Hello everybody! I'm interested in React 95, but usually, I create a React project by Vite. So I want to know how to do it. Thank you.
Oct. 26, 2024 in China.

You must be logged in to vote

Replies: 1 comment

Comment options

Hey! 👋

React95 and Vite are both great choices for building a project! To set up a React95 project with Vite, you can follow these steps:
Steps to Set Up React95 with Vite

Create a Vite Project: Start by creating a new Vite project with React. Open your terminal and run:

npm create vite@latest my-react95-app --template react
cd my-react95-app

Install React95: Once the project is created, install the react95 package along with styled-components (required by React95):

npm install react95 styled-components

Add React95 Styles: Import the default React95 theme in your main entry file (usually main.jsx or App.jsx):

javascript

import { ThemeProvider, GlobalStyle, original } from 'react95';
import 'react95/dist/react95.min.css';

function App() {
return (


{/* Your app components go here */}

);
}

export default App;

Use React95 Components: Now you can start using React95 components! Here’s an example:

javascript

import { Button } from 'react95';

function App() {
return (


Click me!

);
}

Run the App: Finally, start your Vite development server:

npm run dev

That’s it! You should now have a Vite-based React app styled with React95 components. Let me know if you need further help! 😊

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /