0.1.9 • Published 6 months ago

@teenageinterface/button v0.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Button Component

The Button component is part of the @teenageinterface Angular component library. It is a versatile button element with customizable properties for various use cases.

Installation

Ensure that you have installed the @teenageinterface/button library in your Angular project. If not, you can add it using:

npm install @teenageinterface/button

Usage

Import the Button component module into your Angular application:

import { CommonModule } from '@angular/common';
import { ButtonComponent } from "@teenageinterface/button";

@Component({
  selector: "pages-button",
  standalone: true,
  imports: [ButtonComponent],
  template: ` <tiButton>Button</tiButton> `,
})

export default class ButtonPage {}

Example

<tiButton
  [id]="'unique-button-id'"
  [disabled]="false"
  [loading]="true"
  [type]="'primary'"
>
  Click Me
</tiButton>

Properties

PropertyTypeDefaultDescription
idstring \| nullnullThe unique identifier for the button element.
disabledbooleanfalseDetermines if the button is disabled.
loadingbooleanfalseDisplays a loading spinner when set to true.
type'default' \| 'primary' \| 'destructive' \| 'outline' \| 'ghost' \| 'link''default'Specifies the button's style variant.

Types

type

  • default: Standard button with no special styling.
  • primary: Emphasized button for primary actions.
  • destructive: Button for destructive actions (e.g., delete).
  • outline: Button with an outline style.
  • ghost: Minimalist button without borders or background.
  • link: Styled as a hyperlink.

Accessibility

  • Ensure the id property is set for proper identification when integrating with forms or testing frameworks.
  • Use disabled to indicate non-interactive buttons to users and assistive technologies.

Documentation

For more information, visit the official documentation.

Repository

The source code is available on GitHub.

License

This project is licensed under the MIT License.

0.1.8

6 months ago

0.1.7

6 months ago

0.1.9

6 months ago

0.1.6

7 months ago

0.1.5

7 months ago

0.1.4

7 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago