Skip to content

HenriquePi/NextTailwind

Repository files navigation

Developer Information

Created With HenriquePi NextTailwind start

Node

node version 16.18.0

CSS

  • app is set up with tailwind
  • most style can be written in /styles/tailwind.css
  • you can target class & tags with this syntax:
      .your-class {
        @apply py-2 px-4 bg-blue-500;
      }
    • tailwind is mobile first, so write mobile classes:
      <div className="p-2"/>
    • followed by breakpoint & upper class
      <div className="p-2 md:p-4"/>
  • fonts are in /styles/font
    • fonts are initialized in tailwind.css

Breakpoints

  • 'xs': '375px',
  • 'sm': '640px',
  • 'md': '768px',
  • 'lg': '1024px',
  • 'xl': '1280px',
  • '2xl': '1536px',
  • '3xl': '1920px',
  • '4xl': '2560px',
  • '5xl': '3840px',
  • '6xl': '7680px',

Typography

  • font size is set to 62.5%
  • use rem for font sizes (e.g 12px - 1.2rem)
  • default font is set in tailwind.css

project structure

  • layout (header/footer) are in /components/layout
  • project is modular
  • page specific components are in /components/[pagename]
  • global components are in /components
    • global sub-components are in /components/[component]

Assets

  • assets are located in /assets
  • sub folders are based on page/brand resources/generic use
  • import assets like other files
      import AnyImageName from "/assets/brand/logo.png"
      import Image from "next/image";
      <Image src={AnyImage} alt="Any Image">

Types

  • custom object types are in the /type folder

Forms

NextJS starter README

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

About

Next/tailwind start

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published