LaralCN-UI copy-and-own Blade components

Layout

separator

Visual or semantic divider.

Preview

LaralCN-UI
Copy-and-own components
Blog Docs Source

CLI

php artisan ui:add separator

Dependencies

  • composer: gehrisandro/tailwind-merge-laravel

Source

@props([
    'orientation' => 'horizontal',
])

@php
    $base = $orientation === 'vertical' ? 'h-full w-px' : 'h-px w-full';

    $classes = \TailwindMerge\Laravel\Facades\TailwindMerge::merge(
        'shrink-0 bg-border',
        $base,
        $attributes->get('class'),
    );
@endphp

<div role="separator" aria-orientation="{{ $orientation }}"
    {{ $attributes->except('class')->merge(['class' => $classes]) }}></div>

orientation: horizontal (default) or vertical.