File

src/components/sq-tabs/sq-tab/sq-tab.component.ts

Description

Represents a tab component for displaying tabbed content.

Look the link about the component in original framework and the appearance

See https://css.squidit.com.br/components/tabs

Example :
<sq-tab [title]="'Tab Title'" (whenOpen)="handleTabOpen()">
<!-- Content Here -->
</sq-tab>

Metadata

Index

Inputs
Outputs

Inputs

active
Type : boolean
Default value : false

Flag to indicate if the tab is active (open).

borderColor
Type : string
Default value : 'transparent'

The border color of the tab.

color
Type : string
Default value : 'white'

The background color of the tab.

disabled
Type : boolean

Flag to indicate if the tab is disabled.

hideHtml
Type : boolean
Default value : false

Flag to hide the tab html.

loading
Type : boolean

Flag to indicate if the tab is in a loading state.

tabName
Type : string
Default value : ''

The name or identifier of the tab.

textColor
Type : string
Default value : 'black'

The text color of the tab title.

title
Type : string
Default value : ''

The title displayed on the tab.

Outputs

whenOpen
Type : EventEmitter<void>

Event emitted when the tab is opened.

import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'
/**
 * Represents a tab component for displaying tabbed content.
 *
 * Look the link about the component in original framework and the appearance
 *
 * @see {@link https://css.squidit.com.br/components/tabs}
 * 
 * @example
 * <sq-tab [title]="'Tab Title'" (whenOpen)="handleTabOpen()">
 * <!-- Content Here -->
 * </sq-tab>
 *
 */
@Component({
  selector: 'sq-tab',
  templateUrl: './sq-tab.component.html',
  styleUrls: ['./sq-tab.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class SqTabComponent {
  /**
   * Flag to indicate if the tab is active (open).
   */
  @Input() active = false

  /**
   * The title displayed on the tab.
   */
  @Input() title = ''

  /**
   * The text color of the tab title.
   */
  @Input() textColor = 'black'

  /**
   * The background color of the tab.
   */
  @Input() color = 'white'

  /**
   * The border color of the tab.
   */
  @Input() borderColor = 'transparent'

  /**
   * Flag to indicate if the tab is disabled.
   */
  @Input() disabled?: boolean

  /**
   * Flag to indicate if the tab is in a loading state.
   */
  @Input() loading?: boolean

  /**
   * The name or identifier of the tab.
   */
  @Input() tabName = ''

  /**
   * Flag to hide the tab html.
   */
  @Input() hideHtml = false

  /**
   * Event emitted when the tab is opened.
   */
  @Output() whenOpen: EventEmitter<void> = new EventEmitter()
}
<div *ngIf="!hideHtml" [hidden]="!active" class="pane">
  <ng-content></ng-content>
</div>

./sq-tab.component.scss

:host {
    .pane {
        padding: 0;
    }
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""