https://github.com/texmeijin/nextjs-linaria-starter
Starter of Next.js(over v10) and Linaria.
https://github.com/texmeijin/nextjs-linaria-starter
Last synced: about 2 months ago
JSON representation
Starter of Next.js(over v10) and Linaria.
- Host: GitHub
- URL: https://github.com/texmeijin/nextjs-linaria-starter
- Owner: TeXmeijin
- Created: 2021-03-24T04:26:29.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-24T04:32:19.000Z (about 4 years ago)
- Last Synced: 2025-01-23T03:46:07.907Z (4 months ago)
- Language: JavaScript
- Size: 53.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Next.js and Linaria starter
## Linaria
[linaria](https://github.com/callstack/linaria) is Zero-runtime CSS in JS library.
You can write CSS in JS, but with zero runtime, CSS is extracted to CSS files during build!
## How to configuration
`next.config.js`
```javascript
const withLinaria = require('next-linaria');module.exports = withLinaria({
});
````.babelrc`
```
{
"presets": ["next/babel", "linaria/babel"]
}
```### packages
- linaria
- next-linaria
- @babel/core**NOTICE** [@zeit/next-css](https://www.npmjs.com/package/@zeit/next-css) also can be used for linaria setting up. But it is deprecated. So I recommend use `next-linaria`
## How to use
```react
const headingStyle = css`
font-weight: bold;
font-size: 1.4rem;
color: red;
`
Nextjs Linaria boilerplate
```