Skip to content

cloudnode-pro/components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5a4f31d · Mar 17, 2025
Dec 18, 2024
Oct 8, 2024
Mar 14, 2025
Oct 10, 2024
Oct 7, 2024
Oct 11, 2024
Mar 17, 2025
Mar 17, 2025
Oct 8, 2024
Oct 11, 2024

Repository files navigation

@cldn/components

Base classes for creating web components.

This library is intended for use in a web browser environment. A bundler, such as Webpack or Vite is recommended.

Documentation

Installation

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:

import {Component} from "@cldn/components";

class ButtonComponent extends Component<HTMLButtonElement> {
    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/.