Skip to content
Brok UI

Loading…

No results

Biolink

Open source

Link-in-bio layouts — a centered mobile-first column with avatar, bio and a stack of full-width link buttons.

Preview

resources/views/blocks/biolink-cover.blade.php Blade
@props([
    'name'     => 'Aria Voss',
    'handle'   => '@ariavoss',
    'bio'      => 'Building things on the internet. Designer, developer, occasional writer.',
    'avatar'   => null,
    'fallback' => 'AV',
    'links'    => null,
    'socials'  => null,
])

@php
    $links ??= [
        ['label' => 'Portfolio & case studies', 'href' => '#', 'icon' => 'portfolio'],
        ['label' => 'Subscribe to the newsletter', 'href' => '#', 'icon' => 'mail'],
        ['label' => 'Watch the design series', 'href' => '#', 'icon' => 'play'],
        ['label' => 'Book a mentoring session', 'href' => '#', 'icon' => 'calendar'],
        ['label' => 'Download the free kit', 'href' => '#', 'icon' => 'download'],
    ];
    $socials ??= [['label' => 'X', 'href' => '#', 'icon' => 'x'], ['label' => 'GitHub', 'href' => '#', 'icon' => 'github'], ['label' => 'Instagram', 'href' => '#', 'icon' => 'instagram'], ['label' => 'YouTube', 'href' => '#', 'icon' => 'youtube']];
    // Map the block's `socials` contract onto social-links: `platform` (or the older
    // `icon` key / a label) picks the mark; a raw `path` becomes a custom `icon`.
    $socialLinks = array_map(fn (array $s) => [
        'platform' => $s['platform'] ?? (isset($s['icon']) && ! str_contains($s['icon'], '<') ? $s['icon'] : strtolower(str_replace('.', '', $s['label'] ?? 'x'))),
        'label' => $s['label'] ?? null,
        'href' => $s['href'] ?? '#',
        'icon' => isset($s['path']) ? '<path d="'.$s['path'].'"/>' : (isset($s['icon']) && str_contains($s['icon'], '<') ? $s['icon'] : null),
    ], $socials);

    $linkIcons = [
        'portfolio' => 'M4 5a1 1 0 0 1 1-1h5v16H5a1 1 0 0 1-1-1V5Zm7-1h8a1 1 0 0 1 1 1v4h-9V4Zm0 7h9v6a1 1 0 0 1-1 1h-8v-7Z',
        'mail' => 'M4 7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7Zm0 .5 8 5 8-5',
        'play' => 'M5 5.5v13a1 1 0 0 0 1.52.85l10.5-6.5a1 1 0 0 0 0-1.7L6.52 4.65A1 1 0 0 0 5 5.5Z',
        'calendar' => 'M7 3v3m10-3v3M4 9h16M5 6h14a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Z',
        'download' => 'M12 3v13m0 0-4-4m4 4 4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2',
    ];
@endphp

<section {{ $attributes->merge(['class' => 'bg-muted/30 py-12 text-foreground']) }}>
    <div class="mx-auto w-full max-w-md px-4">
        <div class="overflow-hidden rounded-lg border border-border bg-card shadow-sm">
            <div class="h-32 bg-gradient-to-br from-primary to-primary/70" aria-hidden="true"></div>
            <div class="-mt-12 flex justify-center px-6">
                <x-ui.avatar size="xl" :src="$avatar" :alt="$name" :fallback="$fallback" class="ring-4 ring-card" />
            </div>
            <div class="px-6 pb-2 pt-4 text-center">
                <h1 class="text-lg font-semibold tracking-tight text-card-foreground">{{ __($name) }}</h1>
                <p class="mt-0.5 text-sm font-medium text-muted-foreground">{{ $handle }}</p>
                @if ($bio)<p class="mt-4 text-pretty text-sm leading-relaxed text-muted-foreground">{{ __($bio) }}</p>@endif
            </div>

            <nav class="flex flex-col gap-2 px-6 pb-6 pt-4" aria-label="{{ __('Links') }}">
                @foreach ($links as $link)
                    <a href="{{ $link['href'] }}" class="group flex h-12 w-full items-center justify-between gap-4 rounded-md border border-border bg-card px-4 text-sm font-medium transition-shadow hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
                        <span class="flex min-w-0 items-center gap-2">
                            <span class="flex size-7 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground transition-colors group-hover:bg-accent group-hover:text-accent-foreground" aria-hidden="true">
                                <svg class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="{{ $linkIcons[$link['icon']] ?? $linkIcons['portfolio'] }}" /></svg>
                            </span>
                            <span class="truncate text-start">{{ __($link['label']) }}</span>
                        </span>
                        <svg class="size-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5 rtl:-scale-x-100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 6 6 6-6 6" /></svg>
                    </a>
                @endforeach
            </nav>

            <x-ui.social-links :links="$socialLinks" variant="outline" shape="full" size="sm" class="justify-center border-t border-border px-6 py-4" />
        </div>
    </div>
</section>

Installation

terminal
php artisan ui:add blocks/biolink-cover

Installs these dependencies automatically:

Registry contract

Install confidence

php artisan ui:add blocks/biolink-cover 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.1.2
License
open
Stability
stable
Contract
v1
Foundation
≥ 1.0.0
Type Generated target
blade resources/views/blocks/biolink-cover.blade.php

Registry dependencies

avatar social-links

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.

biolink-cover.md
# Brok UI block: Biolink Cover (`biolink-cover`)

A link-in-bio card with a gradient cover banner, overlapping avatar, stacked link buttons and a social-icon row.

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/biolink-cover
```

## Render it

```blade
<x-blocks.biolink-cover />
```

## Props

- `name` (string, default `Aria Voss`)
- `handle` (string, default `@ariavoss`)
- `bio` (string, default `Building things on the internet. Designer, developer, occasional writer.`)
- `avatar` (mixed|null, default `null`)
- `fallback` (string, default `AV`)
- `links` (mixed|null, default `null`)
- `socials` (mixed|null, default `null`)

## Use when

- Building a link-in-bio card topped with a gradient cover banner and an overlapping avatar for a more editorial look.
- Stacking full-width link buttons beneath the cover with a social-icon row at the base.

## Avoid when

- Use biolink-links for a plain gradient backdrop, or biolink-card for a two-column link grid instead of a cover banner.

## Rules

- Render the installed block with `<x-blocks.biolink-cover />` 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/biolink-cover
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/biolink-cover.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

  • Building a link-in-bio card topped with a gradient cover banner and an overlapping avatar for a more editorial look.
  • Stacking full-width link buttons beneath the cover with a social-icon row at the base.

Avoid when

  • Use biolink-links for a plain gradient backdrop, or biolink-card for a two-column link grid instead of a cover banner.

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.biolink-cover />

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/biolink-cover.blade.php Blade
@props([
    'name'     => 'Aria Voss',
    'handle'   => '@ariavoss',
    'bio'      => 'Building things on the internet. Designer, developer, occasional writer.',
    'avatar'   => null,
    'fallback' => 'AV',
    'links'    => null,
    'socials'  => null,
])

@php
    $links ??= [
        ['label' => 'Portfolio & case studies', 'href' => '#', 'icon' => 'portfolio'],
        ['label' => 'Subscribe to the newsletter', 'href' => '#', 'icon' => 'mail'],
        ['label' => 'Watch the design series', 'href' => '#', 'icon' => 'play'],
        ['label' => 'Book a mentoring session', 'href' => '#', 'icon' => 'calendar'],
        ['label' => 'Download the free kit', 'href' => '#', 'icon' => 'download'],
    ];
    $socials ??= [['label' => 'X', 'href' => '#', 'icon' => 'x'], ['label' => 'GitHub', 'href' => '#', 'icon' => 'github'], ['label' => 'Instagram', 'href' => '#', 'icon' => 'instagram'], ['label' => 'YouTube', 'href' => '#', 'icon' => 'youtube']];
    // Map the block's `socials` contract onto social-links: `platform` (or the older
    // `icon` key / a label) picks the mark; a raw `path` becomes a custom `icon`.
    $socialLinks = array_map(fn (array $s) => [
        'platform' => $s['platform'] ?? (isset($s['icon']) && ! str_contains($s['icon'], '<') ? $s['icon'] : strtolower(str_replace('.', '', $s['label'] ?? 'x'))),
        'label' => $s['label'] ?? null,
        'href' => $s['href'] ?? '#',
        'icon' => isset($s['path']) ? '<path d="'.$s['path'].'"/>' : (isset($s['icon']) && str_contains($s['icon'], '<') ? $s['icon'] : null),
    ], $socials);

    $linkIcons = [
        'portfolio' => 'M4 5a1 1 0 0 1 1-1h5v16H5a1 1 0 0 1-1-1V5Zm7-1h8a1 1 0 0 1 1 1v4h-9V4Zm0 7h9v6a1 1 0 0 1-1 1h-8v-7Z',
        'mail' => 'M4 7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7Zm0 .5 8 5 8-5',
        'play' => 'M5 5.5v13a1 1 0 0 0 1.52.85l10.5-6.5a1 1 0 0 0 0-1.7L6.52 4.65A1 1 0 0 0 5 5.5Z',
        'calendar' => 'M7 3v3m10-3v3M4 9h16M5 6h14a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Z',
        'download' => 'M12 3v13m0 0-4-4m4 4 4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2',
    ];
@endphp

<section {{ $attributes->merge(['class' => 'bg-muted/30 py-12 text-foreground']) }}>
    <div class="mx-auto w-full max-w-md px-4">
        <div class="overflow-hidden rounded-lg border border-border bg-card shadow-sm">
            <div class="h-32 bg-gradient-to-br from-primary to-primary/70" aria-hidden="true"></div>
            <div class="-mt-12 flex justify-center px-6">
                <x-ui.avatar size="xl" :src="$avatar" :alt="$name" :fallback="$fallback" class="ring-4 ring-card" />
            </div>
            <div class="px-6 pb-2 pt-4 text-center">
                <h1 class="text-lg font-semibold tracking-tight text-card-foreground">{{ __($name) }}</h1>
                <p class="mt-0.5 text-sm font-medium text-muted-foreground">{{ $handle }}</p>
                @if ($bio)<p class="mt-4 text-pretty text-sm leading-relaxed text-muted-foreground">{{ __($bio) }}</p>@endif
            </div>

            <nav class="flex flex-col gap-2 px-6 pb-6 pt-4" aria-label="{{ __('Links') }}">
                @foreach ($links as $link)
                    <a href="{{ $link['href'] }}" class="group flex h-12 w-full items-center justify-between gap-4 rounded-md border border-border bg-card px-4 text-sm font-medium transition-shadow hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
                        <span class="flex min-w-0 items-center gap-2">
                            <span class="flex size-7 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground transition-colors group-hover:bg-accent group-hover:text-accent-foreground" aria-hidden="true">
                                <svg class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="{{ $linkIcons[$link['icon']] ?? $linkIcons['portfolio'] }}" /></svg>
                            </span>
                            <span class="truncate text-start">{{ __($link['label']) }}</span>
                        </span>
                        <svg class="size-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5 rtl:-scale-x-100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 6 6 6-6 6" /></svg>
                    </a>
                @endforeach
            </nav>

            <x-ui.social-links :links="$socialLinks" variant="outline" shape="full" size="sm" class="justify-center border-t border-border px-6 py-4" />
        </div>
    </div>
</section>

Ownership & lifecycle

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