An open API service indexing awesome lists of open source software.

https://github.com/stylescape/example-react

Stylescape Example | React
https://github.com/stylescape/example-react

react stylescape

Last synced: about 1 month ago
JSON representation

Stylescape Example | React

Awesome Lists containing this project

README

          

[![GitHub License](https://img.shields.io/github/license/stylescape/example-react?style=flat-square&logo=readthedocs&logoColor=FFFFFF&label=&labelColor=%23041B26&color=%23041B26&link=LICENSE)](https://github.com/stylescape/example-react/blob/main/LICENSE)
[![devContainer](https://img.shields.io/badge/devContainer-23041B26?style=flat-square&logo=Docker&logoColor=%23FFFFFF&labelColor=%23041B26&color=%23041B26)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/stylescape/example-react)
[![StackBlitz](https://img.shields.io/badge/StackBlitz-23041B26?style=flat-square&logo=StackBlitz&logoColor=%23FFFFFF&labelColor=%23041B26&color=%23041B26)](https://stackblitz.com/github/stylescape/example-react/tree/main?file=src%2Findex.html)


Stylescape Logo


Stylescape + React


Example Project

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/stylescape/example-react)

---

Integrate [Stylescape](https://scape.style) with [React](https://react.dev/) and [Vite](https://vitejs.dev/) for fast development and optimized production builds.

---

## Features

- ⚛️ React 19 with modern hooks and patterns
- ⚡ Vite for lightning-fast HMR and builds
- 🎨 Stylescape's complete styling system
- 🌗 Built-in theme toggle with `data-ss="theme-toggle"`
- 📐 Frame layout with sidebars and ribbons
- 🎹 Interactive accordion with `data-ss="accordion"`

---

## Quickstart

```sh
git clone https://github.com/stylescape/example-react.git
cd example-react
npm install
npm start
```

---

## Project Structure

```
src/
├── App.jsx # Main application component
├── main.jsx # Entry point with Stylescape imports
└── styles/
└── main.scss # Stylescape SCSS import
```

---

## Usage

### 1. Install Dependencies

```sh
npm install stylescape react react-dom
npm install -D vite @vitejs/plugin-react sass
```

### 2. Import Stylescape in SCSS

```scss
// src/styles/main.scss
@use "stylescape";
```

### 3. Import in Entry File

```jsx
// src/main.jsx
import './styles/main.scss';
import 'stylescape';
```

### 4. Use Stylescape Classes

```jsx






{/* Sidebar content */}




Accordion Item

Content here






```

---

## Scripts

| Command | Description |
|---------|-------------|
| `npm start` | Start development server |
| `npm run build` | Build for production |
| `npm run preview` | Preview production build |

---

## Colophon

Made with ❤️ by **[Scape Agency](https://www.scape.agency)**

### Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your changes.

### License

This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for details.

---