leuverink/blade-shape-divider

A blade component port of shapedivider.app

3.0.0 2022-03-09 12:37 UTC

This package is auto-updated.

Last update: 2024-11-02 12:39:59 UTC


README

Top readme divider

Blade shape divider

Latest Version on Packagist

A complete port of shapedivider.app for Laravel Blade

Installation

Laravel 7.0 or higher is required. You can install the package via composer:

composer require leuverink/blade-shape-divider

Usage

<x-shape-divider shape="waves" />

Just like the original, this component needs to be in a container with position: relative in order to work properly.

Customization

Head over to shapedivider.app and create a shape you like. Settings can be passed as props. When you're happy with the shape divider you created, simply copy over it's settings like the example below.

shapedivider.app screenshot

<x-shape-divider
    shape="curves-asymmetrical"
    fill="#FFF"
    :flip="true"
    :invert="true"
    position="bottom"
    height="200px"
    width="150%"
/>

You may use any of these divider shapes:

waves, waves-opacity, curve, curve-asymmetrical, triangle, triangle-asymmetrical, tilt, arrow, split & book

Changing divider color

You may pass any valid color code as the fill prop. By default the fill is set to currentColor, which means the divider inherits the current font color by default. If you want to use a css class to provide the fill color you may do so:

<!-- Use the text color text-blue-600 to fill the divider -->
<x-shape-divider shape="waves" class="text-blue-600" />

<!-- Setting the fill color overrides the text color inheritance -->
<x-shape-divider shape="waves" fill="#3182CE" />

Prop defaults

Component props have the following defaults. If your shape uses any of the defaults they don't have to be passed as props.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

This port should be pretty much complete. Any new features not available in the original shapedivider.app fall outside the scope of this project and will not be merged. Improvements to the API & bugfixes are very welcome :) Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email willem@leuver.ink instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.