https://github.com/auracletech/panels
panels module in TypeScript for easy window-style panels
https://github.com/auracletech/panels
Last synced: 10 months ago
JSON representation
panels module in TypeScript for easy window-style panels
- Host: GitHub
- URL: https://github.com/auracletech/panels
- Owner: AuracleTech
- Created: 2024-02-27T11:11:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-10T14:32:22.000Z (about 1 year ago)
- Last Synced: 2025-05-20T12:53:36.878Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 1.41 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# panels
panels module in TypeScript for easy window-style panels
##### Example

##### Requirements
- `panels.scss`, `panels.ts` and `panels.png`
##### Usage
initialization
```typescript
import "../SCSS/panels.scss";
import { Panels, Panel } from "./panels.ts";
const panels = new Panels();
document.body.append(panels);
```
create a panel
```typescript
const panel_text: Panel = panels.new_panel();
panel_text.content.textContent = "Hello, world!";
```
create a resizable panel
```typescript
const panel_resizable: Panel = panels.new_panel({
resizable: true,
preservable: true,
spawn_at_random: true,
spawn_at_cursor: false,
});
panel_resizable.content.textContent = "Resizable panel!";
```