Pre-1.0. Not intended for public use yet. The API is subject to undocumented change, and these pages may already be wrong about it.

Skip to content

Blade ​

The Blade kit renders a feed page with one component. Install storyfeed/ui, scan its Tailwind utilities and register the Typography plugin.

routes/web.php
php
use Illuminate\Support\Facades\Route;
use Storyfeed\Facades\Storyfeed;

Route::get('/history', fn () => view('history', [
    'page' => Storyfeed::feed()->cursorPaginate(),
]));
resources/views/history.blade.php
blade
<x-storyfeed::feed :page="$page" />
Erica Sinclair
Erica Sinclair placed 3 orders with Scoops Ahoy

The layout must load compiled CSS, for example with @vite('resources/css/app.css'). Attributes such as class land on the feed's root element. Timestamps render once on the server; refresh them in your own JavaScript if needed.

Choosing Components ​

ComponentRenders
feeda page and a link to older activity
iteman activity or group
activity, groupone row; group members behind a disclosure
headlinelinked headline entities
glyph, avatar, railrow markers
metathe line under a headline: time, range and unnamed roles
time, media, bodya timestamp, picture or body
pager, divider, media-stripnavigation and group presentation

All use the storyfeed:: namespace. page takes what get(), cursorPaginate() or simplePaginate() returns, or its JSON decoded as an array. To render items you hold yourself, pass :items="$items" and :next-cursor="$cursor". The empty slot replaces empty-page text; footer replaces the pager.

Rails, day headings, dividers and group disclosure are set in Customizing the Kits.

Registering App Components ​

app/Providers/AppServiceProvider.phpboot()
php
use Storyfeed\Ui\Support\BodyComponents;

app(BodyComponents::class)->register('App/Message', 'feed.message');

A Component body named App/Message renders <x-feed.message> with its props. A name that is not registered renders nothing.

See Host Seams.

Publishing Views ​

bash
php artisan vendor:publish --tag=storyfeed-views

Views land in resources/views/vendor/storyfeed; keep the ones you change. Add icon views under icons/, named for the payload's glyph token. Unmapped tokens use icons/activity. Custom body Acme/Attachment uses components/body/acme/attachment.blade.php, receiving $body and $entity.

The kit’s own strings, such as “Older activity”, are translatable through lang/{locale}.json. The role words after the time and the date-range words (“from”, “until”) are in the storyfeed-ui::meta namespace; override them in lang/vendor/storyfeed-ui/{locale}/meta.php. Blade Components lists every component, attribute, slot and renderer.

Released under the MIT License.