Skip to content

FeatureGrid

<ax-feature-grid> renders a responsive grid of feature cards from a [features] array. Each card shows a ax-icon, title, and description. Token-classed cards re-theme with the active preset. Project an optional heading into the default slot above the grid.

import { AxFeatureGridComponent, type FeatureItem } from '@axisui-ng/blocks';
features: FeatureItem[] = [
{ icon: 'check', title: 'Signals-first', description: 'Zoneless-ready, OnPush everywhere.' },
{ icon: 'star', title: 'OKLCH tokens', description: 'Perceptual color, preset-reactive.' },
{ icon: 'check', title: 'Accessible', description: 'jest-axe tested in 3 modes.' },
];
<ax-feature-grid [features]="features" ariaLabel="Features">
<h2 class="mb-6 text-lg font-semibold">Why this library</h2>
</ax-feature-grid>
InputTypeDefaultNotes
featuresFeatureItem[][]One card per item; tracked by title.
columnsnumber0Fixed column count 14. 0 uses responsive auto (sm:grid-cols-2 lg:grid-cols-3).
ariaLabelstring''Host aria-label on role="group"; empty omits the attribute.
FieldTypeRequiredNotes
iconAxIconNameyesPassed to <ax-icon [name]> (@axisui-ng/icons).
titlestringyesCard heading (also the @for track key).
descriptionstringyesSupporting copy under the title.

columns maps to Tailwind grid classes: 1grid-cols-1; 2sm:grid-cols-2; 3sm:grid-cols-2 lg:grid-cols-3; 4sm:grid-cols-2 lg:grid-cols-4.

SlotSelectorNotes
Default<ng-content />Optional projected content (typically a heading) rendered above the feature cards.

Host is role="group". Set ariaLabel so the group has an accessible name. Decorative icons are aria-hidden="true"; the title and description carry the meaning.

Interactive examples live in Storybook under Blocks / FeatureGrid. Run pnpm storybook to explore them.