Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add next.js to the examples #46

Merged
merged 2 commits into from Dec 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/examples.md
Expand Up @@ -13,6 +13,7 @@ Twind is built to work without a framework - eg framework agnostic - but can be
- [htm/react - React with htm](#htmreact---react-with-htm)
- [Preact](#preact)
- [htm/preact - Preact with htm](#htmpreact---preact-with-htm)
- [Next.js](#nextjs)
- [Svelte](#svelte)
- [Web Components - Custom Elements and Shadow DOM](#web-components---custom-elements-and-shadow-dom)
- [LitElement](#litelement)
Expand Down Expand Up @@ -124,6 +125,24 @@ render(

> [live and interactive demo](https://esm.codes/#aW1wb3J0IHsgaCwgcmVuZGVyIH0gZnJvbSAnaHR0cHM6Ly9jZG4uc2t5cGFjay5kZXYvcHJlYWN0JwppbXBvcnQgaHRtIGZyb20gJ2h0dHBzOi8vY2RuLnNreXBhY2suZGV2L2h0bScKCmltcG9ydCB7IHR3IH0gZnJvbSAnaHR0cHM6Ly9jZG4uc2t5cGFjay5kZXYvdHdpbmQnCgpjb25zdCBodG1sID0gaHRtLmJpbmQoaCkKCnJlbmRlcigKICBodG1sYAogICAgPG1haW4gY2xhc3NOYW1lPSIke3R3YGgtc2NyZWVuIGJnLXB1cnBsZS00MDAgZmxleCBpdGVtcy1jZW50ZXIganVzdGlmeS1jZW50ZXJgfSI+CiAgICAgIDxoMSBjbGFzc05hbWU9IiR7dHdgZm9udC1ib2xkIHRleHQoY2VudGVyIDV4bCB3aGl0ZSBzbTpncmF5LTgwMCBtZDpwaW5rLTcwMClgfSI+CiAgICAgICAgVGhpcyBpcyBUd2luZCEKICAgICAgPC9oMT4KICAgIDwvbWFpbj4KICBgLAogIGRvY3VtZW50LmJvZHksCikK)

## [Next.js](https://nextjs.org/)

```jsx
import { tw } from "twind"

export default function IndexPage() {
return (
<main className={tw`h-screen bg-purple-400 flex items-center justify-center`}>
<h1 className={tw`font-bold text(center 5xl white sm:gray-800 md:pink-700)`}>
This is Twind!
</h1>
</main>
)
}
```

> [live and interactive demo](https://codesandbox.io/s/twind-next-x5gtk)

## [Svelte](https://svelte.dev/)

```html
Expand Down