https://github.com/cloudnode-pro/components
Base classes for web components
https://github.com/cloudnode-pro/components
Last synced: 9 months ago
JSON representation
Base classes for web components
- Host: GitHub
- URL: https://github.com/cloudnode-pro/components
- Owner: cloudnode-pro
- License: lgpl-3.0
- Created: 2024-10-07T16:21:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-19T14:00:55.000Z (about 1 year ago)
- Last Synced: 2024-10-19T14:05:16.224Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 158 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# @cldn/components
Base classes for creating web components.
This library is intended for use in a web browser environment. A bundler, such as [Webpack](https://webpack.js.org/)
or [Vite](https://vitejs.dev/) is recommended.
[**Documentation**](https://components.cldn.pro)
## Installation
```shell
npm i @cldn/components
```
## Usage
To create your own components, it's recommended to extend one of the classes provided in this library.
For example:
```ts
import {Component} from "@cldn/components";
class ButtonComponent extends Component {
public constructor(text: string) {
super("button");
this.text(text)
.class("bg-blue-500", "px-4", "…");
}
}
```
## Licence
Copyright © 2024 Cloudnode OÜ
This file is part of @cldn/components.
@cldn/components is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
later version.
@cldn/components is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
You should have received a copy of the GNU Lesser General Public License along with @cldn/components. If not,
see https://www.gnu.org/licenses/.