Skip to content
Brok UI

Loading…

No results

Features

Open source

Feature sections — icon grids, bordered cards, alternating media rows, bento layouts, a services variant and an industries grid.

Preview

3 of 23

resources/views/blocks/features-cards.blade.php Blade
@props([
    'eyebrow' => 'Features',
    'heading' => 'Everything you need to ship faster',
    'subheading' => 'A focused set of building blocks that scale with your product, from first commit to production.',
    'features' => null,
])

@php
    $features ??= [
        [
            'title' => 'Own the source',
            'description' => 'Components are copied into your project as plain Blade. No runtime lock-in — edit anything you like.',
            'href' => '#',
        ],
        [
            'title' => 'Token-driven theming',
            'description' => 'Re-theme light, dark, and per-surface variants by editing CSS variables only. No component edits required.',
            'href' => '#',
        ],
        [
            'title' => 'Accessible by default',
            'description' => 'Every primitive targets WCAG 2.2 AA: keyboard support, focus-visible states, ARIA wiring, and RTL-safe layout.',
            'href' => '#',
        ],
        [
            'title' => 'Safe updates',
            'description' => 'Pull upstream changes with a single command. Edited files are never overwritten and produce a reviewable diff.',
            'href' => '#',
        ],
        [
            'title' => 'Composable blocks',
            'description' => 'Higher-level blocks compose the same primitives, so your patterns stay consistent across every page.',
            'href' => '#',
        ],
        [
            'title' => 'Laravel-native',
            'description' => 'Built on Blade, Tailwind, and Alpine. It fits the tools you already use instead of fighting them.',
            'href' => '#',
        ],
    ];
@endphp

<x-ui.section space="xl" {{ $attributes }}>
    <x-ui.container gutter="sm">
        <x-ui.section-heading align="center" overline-style="badge" :overline="$eyebrow" :title="$heading" :subtitle="$subheading" />

        <div class="mt-12 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
            @foreach ($features as $feature)
                <x-ui.card class="group h-full border-border transition-shadow transition-colors hover:border-primary/40 hover:shadow-md">
                    <x-ui.card.header>
                        <x-ui.icon.tile>
                            <svg class="size-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                <path d="m9 12 2 2 4-4" />
                                <path d="M12 3a9 9 0 1 0 9 9 9 9 0 0 0-9-9Z" />
                            </svg>
                        </x-ui.icon.tile>
                        <x-ui.card.title class="mt-4">{{ __($feature['title']) }}</x-ui.card.title>
                        <x-ui.card.description>{{ __($feature['description']) }}</x-ui.card.description>
                    </x-ui.card.header>

                    <x-ui.card.footer>
                        <x-ui.button :href="$feature['href'] ?? '#'" variant="link" :with-arrow="true">{{ __('Learn more') }}</x-ui.button>
                    </x-ui.card.footer>
                </x-ui.card>
            @endforeach
        </div>
    </x-ui.container>
</x-ui.section>

Installation

terminal
php artisan ui:add blocks/features-cards

Registry contract

Install confidence

php artisan ui:add blocks/features-cards writes only the generated targets below. The CLI validates each file hash before writing and prompts before replacing local changes unless --force is used.

Version
1.0.7
License
open
Stability
stable
Contract
v1
Foundation
≥ 1.0.0
Type Generated target
blade resources/views/blocks/features-cards.blade.php

Registry dependencies

badge button card container icon section section-heading

Package dependencies

composer: jml/brok:^0.2

Use with AI

A brief for your coding agent: what the block is, the install command, how to render it, its props and the rules. Copy it, or open a prompt about this block in an assistant.

features-cards.md
# Brok UI block: Features Cards (`features-cards`)

Centered heading with a responsive grid of feature cards, each with an icon tile, title, description, and a Learn more link.

Brok UI is a Laravel Blade registry. `ui:add` copies this block into the app as plain Blade the app owns; it composes installed `<brok:*>` primitives and semantic design tokens.

## Install

```bash
php artisan ui:add blocks/features-cards
```

## Render it

```blade
<x-blocks.features-cards />
```

## Props

- `eyebrow` (string, default `Features`)
- `heading` (string, default `Everything you need to ship faster`)
- `subheading` (string, default `A focused set of building blocks that scale with your product, from first commit to production.`)
- `features` (mixed|null, default `null`)

## Use when

- Listing features as a card grid, each with an icon tile, title, description and a Learn more link.
- Giving each feature its own bordered surface rather than a plain grid item.

## Avoid when

- Use features-grid or features-centered for a card-less feature grid instead.

## Rules

- Render the installed block with `<x-blocks.features-cards />` and pass data through its props; edit the copied file only for structural changes.
- Keep the semantic design tokens (`bg-background`, `text-muted-foreground`); never swap in raw colour utilities.
- Keep the `data-slot` attributes and the logical (start/end) spacing so the markup still mirrors under `dir="rtl"`.

## Links

- Docs: https://brokui.dev/blocks/features-cards
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/features-cards.json

Working in Claude Code, Cursor or Codex? Give the agent the whole registry through the MCP server or the Brok UI skill.

Guidance

Use when

  • Listing features as a card grid, each with an icon tile, title, description and a Learn more link.
  • Giving each feature its own bordered surface rather than a plain grid item.

Avoid when

  • Use features-grid or features-centered for a card-less feature grid instead.

Anti-patterns

  • Do not replace semantic props with conflicting utility classes.
  • Do not remove labels, focus styles, or state attributes.

Usage

Render the block as a component, passing data where useful:

resources/views/welcome.blade.php Blade
<x-blocks.features-cards />

Built from primitives

Composes <brok:*> Semantic tokens Re-themeable RTL-ready

This block composes installed <brok:*> primitives and semantic design tokens only — it does not reimplement any primitive. Re-theme it (light, dark, admin, customer) by editing CSS variables; flip the preview to RTL to confirm it mirrors.

Source

The exact, editable file ui:add writes into your app. The preview above renders this same source — there are no preview-only blocks.

resources/views/blocks/features-cards.blade.php Blade
@props([
    'eyebrow' => 'Features',
    'heading' => 'Everything you need to ship faster',
    'subheading' => 'A focused set of building blocks that scale with your product, from first commit to production.',
    'features' => null,
])

@php
    $features ??= [
        [
            'title' => 'Own the source',
            'description' => 'Components are copied into your project as plain Blade. No runtime lock-in — edit anything you like.',
            'href' => '#',
        ],
        [
            'title' => 'Token-driven theming',
            'description' => 'Re-theme light, dark, and per-surface variants by editing CSS variables only. No component edits required.',
            'href' => '#',
        ],
        [
            'title' => 'Accessible by default',
            'description' => 'Every primitive targets WCAG 2.2 AA: keyboard support, focus-visible states, ARIA wiring, and RTL-safe layout.',
            'href' => '#',
        ],
        [
            'title' => 'Safe updates',
            'description' => 'Pull upstream changes with a single command. Edited files are never overwritten and produce a reviewable diff.',
            'href' => '#',
        ],
        [
            'title' => 'Composable blocks',
            'description' => 'Higher-level blocks compose the same primitives, so your patterns stay consistent across every page.',
            'href' => '#',
        ],
        [
            'title' => 'Laravel-native',
            'description' => 'Built on Blade, Tailwind, and Alpine. It fits the tools you already use instead of fighting them.',
            'href' => '#',
        ],
    ];
@endphp

<x-ui.section space="xl" {{ $attributes }}>
    <x-ui.container gutter="sm">
        <x-ui.section-heading align="center" overline-style="badge" :overline="$eyebrow" :title="$heading" :subtitle="$subheading" />

        <div class="mt-12 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
            @foreach ($features as $feature)
                <x-ui.card class="group h-full border-border transition-shadow transition-colors hover:border-primary/40 hover:shadow-md">
                    <x-ui.card.header>
                        <x-ui.icon.tile>
                            <svg class="size-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                <path d="m9 12 2 2 4-4" />
                                <path d="M12 3a9 9 0 1 0 9 9 9 9 0 0 0-9-9Z" />
                            </svg>
                        </x-ui.icon.tile>
                        <x-ui.card.title class="mt-4">{{ __($feature['title']) }}</x-ui.card.title>
                        <x-ui.card.description>{{ __($feature['description']) }}</x-ui.card.description>
                    </x-ui.card.header>

                    <x-ui.card.footer>
                        <x-ui.button :href="$feature['href'] ?? '#'" variant="link" :with-arrow="true">{{ __('Learn more') }}</x-ui.button>
                    </x-ui.card.footer>
                </x-ui.card>
            @endforeach
        </div>
    </x-ui.container>
</x-ui.section>

Ownership & lifecycle

Owner, release state, review evidence and adoption for this item.
Owner
Platform UI (@JoshJML)
Current version
1.0.7
Status
Stable
License
open
Deprecation
Not deprecated
Contract
v1
Foundation
≥ 1.0.0