yard/brave-components

Collection of logic-heavy components used in Brave projects.

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 2

Type:package

pkg:composer/yard/brave-components

v1.0.9 2025-10-27 12:48 UTC

This package is auto-updated.

Last update: 2025-12-05 12:16:24 UTC


README

Code Style PHPStan Tests Code Coverage Badge Lines of Code Badge

Collection of logic-heavy components used in Brave projects.

Requirements

Installation

To install this package using Composer, follow these steps:

  1. Install this package with Composer:

    composer require yard/brave-components
  2. Run the Acorn WP-CLI command to discover this package:

    wp acorn package:discover

You can publish the config file with:

wp acorn vendor:publish --provider="Yard\Brave\ComponentsServiceProvider"

To only publish the views, run:

wp acorn vendor:publish --provider="Yard\Brave\ComponentsServiceProvider" --tag="views"

Components

Back Button

Shows a back button that determines its link and text by checking the parent page. If the post has no parent, it sets the link to a predefined parent page slug or defaults to "javascript:history.back();".

Usage:

<x-brave-back-button /> 
<x-brave-back-button text="Terug naar het vacature-overzicht" />
<x-brave-back-button className="custom-class" />

Pattern Content

Shows the content of a pattern by its slug. You can find the slug (post name) using the wp post get CLI command and providing the post ID.

Usage:

<x-brave-pattern-content slug="footer" />
<x-brave-pattern-content slug="single-vacancy-contact-information" />

Configure the admin behavior of each pattern in the components.php config file to automatically save them as drafts (thus hiding them from the pattern inserter), prevent their deletion, and add custom labels in the admin view.

About us

banner