Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukeraymonddowning/alpinimations
Streamline your animations by using these simple blade directives in your components!
https://github.com/lukeraymonddowning/alpinimations
Last synced: 3 months ago
JSON representation
Streamline your animations by using these simple blade directives in your components!
- Host: GitHub
- URL: https://github.com/lukeraymonddowning/alpinimations
- Owner: lukeraymonddowning
- License: mit
- Archived: true
- Created: 2020-06-27T11:59:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-03T12:19:23.000Z (almost 2 years ago)
- Last Synced: 2024-07-23T06:08:44.358Z (4 months ago)
- Language: Blade
- Size: 34.2 KB
- Stars: 101
- Watchers: 7
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Alpinimations
Clean up your Alpine JS animations.
# Table of Contents
- [About Alpinimations](#about-alpinimations)
- [Installation](#installation)
- [Usage](#usage)
- [Available animations](#available-animations)
* [Tailwind UI](#tailwind-ui)
* [Dropdowns](#dropdowns)
* [Menus](#menus)
* [Modals](#modals)
* [Notifications](#notifications)
* [Slideovers](#slideovers)
- [Contributing](#contributing)
- [Code of conduct](#code-of-conduct)
- [License](#license)## About Alpinimations
Alpinimations helps you clean up your Laravel blade files when using Alpine JS. Alpine has a super powerful animation
system, but it can often bloat your HTML. This package bundles common animations into
small blade files that you can include in your HTML.We currently support all Tailwind UI animations and will be adding animations from more places over time.
## Installation
To install the package, simply run `composer require lukeraymonddowning/alpinimations` in the terminal from the root of
your Laravel project.If you'd like to edit the animation files, you can publish the views by running
`php artisan vendor:publish --tag=alpinimations`.## Usage
Using Alpinimations couldn't be simpler. Let's take a super awesome Tailwind UI component, the slideover. After copying over the HTML from the Tailwind UI component library, you'll have something like this:
```html
Panel title
```Note that Tailwind UI includes the animations we should apply. These animations are included out of the box with Alpinimations. Let's sweeten up our component with Alpine:
```html
Panel title
```
Note how we can use the `@anim` blade directive to include all the necessary alpine animation directives. A list of all Tailwind UI animations available can be found below.We can go even further here. As most animations are coupled with `x-show`, Alpinimations includes an `@xshow` blade directive. Check it out:
```html
Panel title
```Suuuuuper clean.
## Available animations
### Tailwind UI#### Dropdowns
- `tailwindui.dropdown.panel` - Can apply to all dropdown components. [Tailwind UI docs](https://tailwindui.com/components/application-ui/elements/dropdowns)#### Menus
- `tailwindui.menu.card` - Can apply to mobile menus such as seen in Tailwind UI hero mobile menus. [Tailwind UI docs](https://tailwindui.com/components/marketing/sections/heroes)
- `tailwindui.menu.flyout` - Works with all flyout menus. [Tailwind UI docs](https://tailwindui.com/components/marketing/elements/flyout-menus)
- `tailwindui.menu.off-canvas` - For those swanky mobile sidebar menus. [Tailwind UI docs](https://tailwindui.com/components/application-ui/application-shells/sidebar)
- `tailwindui.menu.overlay` - For any overlay backgrounds needed when menus are displayed, especially in mobile. [Tailwind UI docs](https://tailwindui.com/components/application-ui/application-shells/sidebar#component-ba754bf465a594eb075045eb9e940b60)#### Modals
- `tailwindui.modal.overlay` - The overlay that shows behind a modal when it is displayed. [Tailwind UI docs](https://tailwindui.com/components/application-ui/overlays/modals)
- `tailwindui.modal.panel` - The actual panel/card that shows the modal content. [Tailwind UI docs](https://tailwindui.com/components/application-ui/overlays/modals)#### Notifications
- `tailwindui.notification.panel` - The container for the notification. [Tailwind UI docs](https://tailwindui.com/components/application-ui/overlays/notifications)#### Select Boxes
- `tailwindui.select.popover` - The option menu popover. [Tailwind UI docs](https://tailwindui.com/components/application-ui/forms/select-menus)#### Slideovers
- `tailwindui.slideover.close-button` - The close button for a slideover. This could apply to any close button. [Tailwind UI docs](https://tailwindui.com/components/application-ui/overlays/slide-overs)
- `tailwindui.slideover.overlay` - The background overlay that applies to certain slideovers. [Tailwind UI docs](https://tailwindui.com/components/application-ui/overlays/slide-overs#component-3e8348c3c183bd14fceb018d4cca1942)
- `tailwindui.slideover.panel` - The actual slideover panel/card that will contain your content. [Tailwind UI docs](https://tailwindui.com/components/application-ui/overlays/slide-overs)## Contributing
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
## Code of Conduct
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
## License
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).