Download the PHP package yard/brave-components without Composer
On this page you can find all versions of the php package yard/brave-components. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yard/brave-components
More information about yard/brave-components
Files in yard/brave-components
Package brave-components
Short Description Collection of logic-heavy components used in Brave projects.
License MIT
Informations about the package brave-components
Brave components
Collection of logic-heavy components used in Brave projects.
Requirements
Installation
To install this package using Composer, follow these steps:
-
Install this package with Composer:
- Run the Acorn WP-CLI command to discover this package:
You can publish the config file with:
To only publish the views, run:
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:
Breadcrumb
Generate a breadcrumb based on the current page. Also adds posts added through the parent-page supports feature. Usage:
Or pass your own collection of items to show a custom breadcrumb:
Dialog
Usage:
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:
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.
Read Speaker
Adds a ReadSpeaker button on specific places with the component and automatically adds it to the content of H1 blocks in the post content. Make sure to configure the readSpeaker settings in the components.php config file to set your customer ID and other options.
Usage:
Nav
Navigation component with optional dropdowns. Provides the right ARIA attributes and keyboard navigation for accessibility.
Dropdown visibility is controlled via aria-expanded. Use it in combination with the group class on the parent item and group-has-aria-expanded variants to show/hide the dropdown.
Dropdown modes
click(default) — opens on clickhover- opens on hover, closes when the mouse leaves the item
For accessibility, the <x-brave::nav> component requires an aria-label.
Example usage with Navi:
Usage without Navi:
Tooltip
Usage:
About us
All versions of brave-components with dependencies
roots/acorn Version ^4.3
spatie/laravel-package-tools Version ^1.16
yard/wp-hook-registrar Version *