TwitterGithub

Tabs

A set of layered sections of content—known as tab panels—that are displayed one at a time.

Account

Make changes to your account here. Click save when you're done.

Installation

npx nx g @spartan-ng/cli:ui tabs

Usage

import {
    HlmTabsComponent,
    HlmTabsContentDirective,
    HlmTabsListComponent,
    HlmTabsTriggerDirective,
} from '@spartan-ng/ui-tabs-helm';
<hlm-tabs tab='account' class='block max-w-3xl mx-auto'>
  <hlm-tabs-list class='w-full grid grid-cols-2' aria-label='tabs example'>
    <button hlmTabsTrigger='account'>Account</button>
    <button hlmTabsTrigger='password'>Password</button>
  </hlm-tabs-list>
  <div hlmTabsContent='account'>
    Make your account here
  </div>
  <div hlmTabsContent='password'>
    Change your password here
  </div>
</hlm-tabs>

Examples

Default

Account

Make changes to your account here. Click save when you're done.

Vertical

Account

Make changes to your account here. Click save when you're done.

Paginated Tabs

Use hlm-paginated-tabs-list instead of hlm-tabs-list for paginated tabs list with next and previous buttons.

Disable pagination with [disablePagination]="true" . Hides the pagination buttons and active tab is not scrolled into view.

Tab 0
Textarea Table