Skip to content

Instantly share code, notes, and snippets.

@wallacemaxters
Last active August 1, 2023 20:10
Show Gist options
  • Save wallacemaxters/3ae3ed6dfab28863f2bd4099d6ee388e to your computer and use it in GitHub Desktop.
Save wallacemaxters/3ae3ed6dfab28863f2bd4099d6ee388e to your computer and use it in GitHub Desktop.
Reusable component to easy use atropos in laravel
<!-- main Atropos container (required), add your custom class here -->
<div {{ $attributes->class('atropos') }}>
<!-- scale container (required) -->
<div class="atropos-scale">
<!-- rotate container (required) -->
<div class="atropos-rotate">
<!-- inner container (required) -->
<div class="atropos-inner">
{{ $slot }}
</div>
</div>
</div>
</div>
@wallacemaxters
Copy link
Author

wallacemaxters commented Aug 1, 2023

In Javascript app.ts:

import Atropos from 'atropos';
import "atropos/css"
Atropos({
  el: '.atropos',
  shadow: false
  // rest of parameters
});

To use Atropos in Laravel:

<x-atropos>
     <img src="..."  >
</x-atropos>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment