Skip to content

Commit 8f92620

Browse files
committed
vite react setup
1 parent 77030d7 commit 8f92620

20 files changed

+447
-304
lines changed

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Abbas Aljuaifari
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,60 @@
1-
# React_sidebar
1+
2+
3+
# React Sidebar Navigation
4+
5+
This is a simple React sidebar navigation component that utilizes the React Router library for routing and Framer Motion for animation.
6+
7+
## Features
8+
9+
- Responsive sidebar navigation with collapsible menu items
10+
- Dynamic routing using React Router
11+
- Smooth animation effects using Framer Motion
12+
- Customizable icons for menu items
13+
- Supports nested sub-routes
14+
15+
## Installation
16+
17+
1. Clone the repository:
18+
```
19+
git clone https://github.com/kit0-0/React_AnimatedSidebar.git
20+
```
21+
22+
2. Change to the project directory:
23+
```
24+
cd your-repo
25+
```
26+
27+
3. Install the dependencies:
28+
```
29+
npm install
30+
```
31+
32+
4. Start the development server:
33+
```
34+
npm start
35+
```
36+
37+
5. Open your browser and visit `http://localhost:3000` to see the application.
38+
39+
## Usage
40+
41+
1. Modify the `routes` array in the `Sidebar.js` file to define your desired navigation links and icons.
42+
43+
2. Customize the styling of the sidebar by modifying the CSS styles in the `Sidebar.css` file.
44+
45+
3. Add additional components and routes to your application as needed.
46+
47+
## Dependencies
48+
49+
- React
50+
- React Router
51+
- Framer Motion
52+
53+
## Contributing
54+
55+
Contributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue or submit a pull request.
56+
57+
## License
58+
59+
This project is licensed under the [MIT License](LICENSE).
60+

index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Vite + React + TS</title>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script type="module" src="/src/main.tsx"></script>
11+
</body>
12+
</html>

package.json

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,30 @@
11
{
2-
"name": "sidebar",
3-
"version": "0.1.0",
2+
"name": "vite-project",
43
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite --open",
8+
"build": "tsc && vite build",
9+
"preview": "vite preview",
10+
"deploy": "vite build && gh-pages -d dist"
11+
},
512
"dependencies": {
6-
"@testing-library/jest-dom": "^5.16.5",
7-
"@testing-library/react": "^13.4.0",
8-
"@testing-library/user-event": "^13.5.0",
13+
"bootstrap": "^5.2.3",
914
"framer-motion": "^7.5.1",
1015
"react": "^18.2.0",
1116
"react-dom": "^18.2.0",
1217
"react-icons": "^4.4.0",
13-
"react-router-dom": "^6.4.1",
14-
"react-scripts": "5.0.1",
15-
"web-vitals": "^2.1.4"
16-
},
17-
"scripts": {
18-
"start": "react-scripts start",
19-
"build": "react-scripts build",
20-
"test": "react-scripts test",
21-
"eject": "react-scripts eject"
22-
},
23-
"eslintConfig": {
24-
"extends": [
25-
"react-app",
26-
"react-app/jest"
27-
]
18+
"react-router-dom": "^6.13.0",
19+
"react-scripts": "5.0.1"
2820
},
29-
"browserslist": {
30-
"production": [
31-
">0.2%",
32-
"not dead",
33-
"not op_mini all"
34-
],
35-
"development": [
36-
"last 1 chrome version",
37-
"last 1 firefox version",
38-
"last 1 safari version"
39-
]
21+
"devDependencies": {
22+
"@types/react": "^18.0.27",
23+
"@types/react-dom": "^18.0.10",
24+
"@types/react-router-dom": "^5.3.3",
25+
"@vitejs/plugin-react": "^3.1.0",
26+
"gh-pages": "^5.0.0",
27+
"typescript": "^4.9.3",
28+
"vite": "^4.3.9"
4029
}
4130
}

public/vite.svg

Lines changed: 1 addition & 0 deletions
Loading

src/App.css

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
2-
31
* {
4-
margin: 0;
5-
padding: 0;
6-
box-sizing: border-box;
7-
}
8-
9-
main {
10-
padding: 10px;
11-
}
2+
margin: 0;
3+
padding: 0;
4+
box-sizing: border-box;
5+
}
6+
7+
main {
8+
padding: 10px;
9+
}

src/App.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/App.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import SideBar from "./components/ListGroup"
2+
3+
import { BrowserRouter as Router } from 'react-router-dom';
4+
5+
6+
const App = () => {
7+
return (
8+
<Router>
9+
<SideBar />
10+
11+
</Router>
12+
);
13+
};
14+
15+
export default App;

src/assets/react.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)