# Alpine.js

Use [`@nanostores/alpine`](https://github.com/nanostores/alpine) plugin and `x-nano` directive to bind stores to Alpine.js components.

```js
import { NanoStores } from '@nanostores/alpine'
import Alpine from 'alpinejs'

import { $profile } from '../stores/profile.js'

Alpine.plugin(NanoStores)
Alpine.magic('profile', () => $profile)
Alpine.start()
```

```html
<div x-data x-nano:profile="$profile">
  <header x-text="'Hi, ' + profile.name"></header>
</div>
```

***

*Imported from the [Nano Stores README](https://github.com/nanostores/nanostores/blob/1.5.5/README.md#alpinejs) for version 1.5.5. Improve this page there.*
