Giter VIP home page Giter VIP logo

stenciljs-button-component's Introduction

Custom Button Web Component

Built With Stencil

Table of Contents

Overview

Custom Button Web Component is a simple and lightweight web component built with Stencil.js.

Using this component

Node Modules

Once installed, include the component directly from a CDN in your HTML file:

  1. Install the component using NPM:
npm i stenciljs-button-component
  1. Script tag: Add the script tag to your HTML file:
<script type="module" src="/node_modules/stenciljs-button-component/dist/stenciljs-button-component/stenciljs-button-component.esm.js"></script>

CDN

Alternatively, include the component directly from a CDN:

<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/stenciljs-button-component/stenciljs-button-component.esm.js"></script>

Integration in HTML

After importing the component, use it in your HTML file:

<kh-button text="Button text" link="button-link"></kh-button>

Customization

Easily customize the button by updating the text and link attributes:

<kh-button text="New Text" link="new-link"></kh-button>

Feel free to modify the button's behavior based on your specific needs.

Example Using CDN

Here's a complete example of integrating and customizing the Custom Button Web Component in an HTML project:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Stencil Button Component Test</title>
    <script type='module' src='https://cdn.jsdelivr.net/npm/[email protected]/dist/stenciljs-button-component/stenciljs-button-component.esm.js'></script>
</head>
<body>
    <kh-button text="Visit Me On NPM" link="https://www.npmjs.com/package/stenciljs-button-component"></kh-button>
</body>
</html>

stenciljs-button-component's People

Contributors

khaledsalshibani avatar

Stargazers

sharaf Ahmed avatar  avatar YousefMH avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.