This changelog is manually generated and not accurate with the package.json, only to show the changes since the last release.
-
Standard Version is now deprecated, and ts-nextjs-tailwind-starter is now using release please. Activate them on
.github/workflows/release-please
-
Lint workflow is now cached and will cancel previous run if there are 2 concurrent runs.
-
Addition of shimmer & blur placeholder for NextImage, and new Skeleton Component with shimmer effect.
CleanShot.2022-02-27.at.11.02.05.mp4
-
You can directly import SVG like
import Vercel from '~/svg/Vercel.svg'; <Vercel className='text-5xl' />
-
Easily access public folder with
~/
prefix. -
ts-nextjs-tailwind-starter now use first-party plugin
prettier-plugin-tailwindcss
-
Fix issue where adding elements to Layout ends up rendering them twice
-
New autofixable rule
props={'hi'} will become props='hi'
-
Add a link component with accent color on top of UnstyledLink.
-
Unused import will automatically be removed by the ESlint autofix.
-
This is to compensate the new PrimaryLink component
-
The shade of the button is now using the
500
instead of400
.
-
You can select text then wrap it with clsx or React.Fragment shorthand.
CleanShot.2021-12-26.at.14.28.07.mp4
-
You can easily add expansion such as React Hook Form + Components, Storybook, and more just using a single command line.
CleanShot.2021-12-04.at.18.54.07-trimmed.mp4
Check out the expansion pack repository for the commands
-
Using layout fill will make the width and height optional
-
Adds
items-center
to make the button vertically centered
-
The color palette configuration is also updated accordingly.
-
- New Variant: Outline and Ghost, you can also add
isDarkBg
prop if you are using these variants with dark background. - Animated Underline style on Primary, Dark, Light is removed
- Added
ring-primary-500
onfocus-visible
- New Variant: Outline and Ghost, you can also add
-
Adds an animated arrow, this component is Polymorphic, the default element is
CustomLink
, you can extend it withas
prop.<ArrowLink as={ButtonLink} variant='light' href='/' > Register now </ArrowLink>
-
-
Now, to add props to Next.js
<Link>
component, you can usenextLinkProps
.<UnstyledLink href='/' nextLinkProps={{ shallow: true, }} > Link </UnstyledLink>
The rest of
<a>
props can be directly added as a prop. -
All components animation respect user preference about motion.
-
Auto Create Branch
Auto ResolveYou have to install the app for your organization/account/repository from the GitHub Marketplace for this to work.
The branch will be created on assign with format
i${number}-${issue_title_lowercase}
. -
Classes are sorted using prettier-plugin-sort-class-names with custom class order on this file and custom variant order on prettierrc
With this plugin, we can now safely check the order of the classes using the preconfigured lint action.
-
Jest is configured and will be run every push on Github Actions
-
- ESLint - will fail if there are any warning and error.
- Type Check - will fail on
tsc
error. - Prettier Check - will fail if there are any formatting error.
- Test - will fail if there are any test failure.
-
- clsx, utility for constructing
className
strings conditionally. - react-icons, svg react icons of popular icon packs.
- clsx, utility for constructing
-
Used as a component for Next.js Link. Will render out Next/Link if the href started with
/
or#
, else will render ana
tag withtarget='_blank'
. Also add a cursor style for outside links -
You can import without using relative path
import Nav from '../../../components/Nav'; simplified to import Nav from '@/components/Nav';
-
Configure the default in
src/components/Seo.tsx
. If you want to use the default, just add<Seo />
on top of your page.You can also customize it per page by overriding the title, description as props
<Seo title='Next.js Tailwind Starter' description='your description' />
or if you want to still keep the title like
%s | Next.js Tailwind Starter
, you can usetemplateTitle
props.
Snippets such as React import, useState, useEffect, React Component. View more
-
3 Husky hooks including:
- pre-commit, running
next lint
and format the code using prettier - commit-msg, running commitlint to ensure the use of Conventional Commit for commit messages
- post-merge, running
yarn
everygit pull
or after merge to ensure all new packages are installed and ready to go
- pre-commit, running
-
Use Favicon Generator and then overwrite the files in
/public/favicon
-
There are default styles for responsive heading sizes, and
.layout
to support a max-width for larger screen size. Find more about it on my blog post -
Open Graph is generated using og.thcl.dev, but please fork and self-host if your website is going to have a lot of traffic.
Check out the repository to see the API parameters.
-
Inter fonts is a variable fonts that is self hosted and preloaded.
This starter is equipped with workspace-snippets, it is encouraged to use it, especially the np
and rc
File inside src/pages
will be the webpage route, there are 2 things that need to be added in Next.js page:
- Seo component
- Layout class to give constraint to viewport width. Read more about layout class.
Snippets: np
import * as React from 'react';
import Seo from '@/components/Seo';
export default function TestPage() {
return (
<>
<Seo templateTitle='Test' />
<main>
<section className=''>
<div className='layout'></div>
</section>
</main>
</>
);
}
To make a new component, It is encouraged to use export default function
. Because when we need to rename it, we only need to do it once.
Snippets: rc
import * as React from 'react';
export default function Component() {
return <div></div>;
}
Snippets: ir
import * as React from 'react';
Snippets: imimg
import Image from 'next/image';
Snippets: iml
import Link from 'next/link';
Snippets: us
const [state, setState] = React.useState(initialState);
Snippets: uf
React.useEffect(() => {}, []);
Snippets: ur
const [state, dispatch] = React.useReducer(someReducer, {});
Snippets: urf
const someRef = React.useRef();
It is really useful when we need to group code. It is also collapsible in VSCode
Snippets: reg
//#region //*============== FORM SUBMIT
//#endregion //*============== FORM SUBMIT
You should also use Better Comments extension.