Label
Gives the label a distinct look.
import { Component } from '@angular/core';
import { HlmCheckboxImports } from '@spartan-ng/helm/checkbox';
import { HlmLabel } from '@spartan-ng/helm/label';
@Component({
selector: 'spartan-label-preview',
imports: [HlmLabel, HlmCheckboxImports],
template: `
<div>
<div class="flex items-center space-x-2">
<hlm-checkbox id="terms" />
<label hlmLabel for="terms">Accept terms and conditions</label>
</div>
</div>
`,
})
export class LabelPreview {}
Installation
npx nx g @spartan-ng/cli:ui label
ng g @spartan-ng/cli:ui label
Usage
import { HlmLabelDirective } from '@spartan-ng/helm/label';
<label hlmLabel>Label</label>
Brain API
BrnLabel
Selector: [brnLabel]
Inputs
Prop | Type | Default | Description |
---|---|---|---|
id | string | `brn-label-${nextId++}` | - |
Helm API
HlmLabel
Selector: [hlmLabel]
Inputs
Prop | Type | Default | Description |
---|---|---|---|
class | ClassValue | - | - |