Plugin: Astro Space
This plugin modifies space-x
and space-y
to target elements within astro-slot
and astro-island
containers as well. It’s only useful if you use Astro.
Installation
You can include this plugin in your Tailwind config like this:
import { astroSpace } from '@splendidlabz/tailwind/plugins'
export default { plugins: [astroSpace], // ... other configurations ...}
Note
This plugin is already included in the layouts preset.
Usage
Use space-x
and space-y
as you normally would. Astro space will automatically target elements within astro-slot
and astro-island
containers.
<div class="space-y-4"> <Component1 client:load /> <Component2 client:load /></div>
Component 1
Component 2
Margin is included here!