설치 가이드

몇 가지 간단한 단계로 newtil-css를 시작할 수 있습니다

📦

npm으로 설치

Node.js 프로젝트에서 사용하는 가장 일반적인 방법입니다.

1

패키지 설치

프로젝트 디렉토리에서 위 명령어를 실행하세요.

npm install newtil-css
2

CSS 파일 import

프로젝트의 메인 CSS 파일이나 JavaScript 진입점에서 import합니다.

import 'newtil-css/dist/newtil.css';
3

사용하기

이제 HTML에서 newtil-css 클래스를 사용할 수 있습니다.

<div class="flex items-center justify-center">
  <h1 class="text-4xl font-bold">Hello, newtil-css!</h1>
</div>
🌐

CDN으로 사용

빠르게 시작하고 싶거나 빌드 도구를 사용하지 않는 경우에 적합합니다.

1

HTML에 링크 추가

HTML의 <head> 태그 안에 위 링크를 추가하세요.

<link 
  rel="stylesheet" 
  href="https://cdn.jsdelivr.net/npm/newtil-css@latest/dist/newtil.css"
/>
2

사용하기

이제 클래스를 사용할 수 있습니다.

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" 
        href="https://cdn.jsdelivr.net/npm/newtil-css@latest/dist/newtil.css">
</head>
<body>
  <div class="flex items-center justify-center min-h-screen">
    <h1 class="text-4xl font-bold text-blue-600">
      Hello, newtil-css!
    </h1>
  </div>
</body>
</html>
🧶

yarn으로 설치

yarn 패키지 매니저를 사용하는 경우입니다.

1

패키지 설치

프로젝트 디렉토리에서 위 명령어를 실행하세요.

yarn add newtil-css
2

CSS 파일 import

프로젝트의 메인 CSS 파일이나 JavaScript 진입점에서 import합니다.

import 'newtil-css/dist/newtil.css';

pnpm으로 설치

pnpm 패키지 매니저를 사용하는 경우입니다.

1

패키지 설치

프로젝트 디렉토리에서 위 명령어를 실행하세요.

pnpm add newtil-css
2

CSS 파일 import

프로젝트의 메인 CSS 파일이나 JavaScript 진입점에서 import합니다.

import 'newtil-css/dist/newtil.css';

프레임워크별 통합

Next.js

// app/layout.tsx 또는 pages/_app.tsx
import 'newtil-css/dist/newtil.css';

export default function RootLayout({ children }) {
  return (
    <html>
      <body>{children}</body>
    </html>
  );
}

React

// src/index.js 또는 src/App.js
import React from 'react';
import 'newtil-css/dist/newtil.css';

function App() {
  return <div className="flex items-center">Hello</div>;
}

Vue.js

// src/main.js
import { createApp } from 'vue';
import 'newtil-css/dist/newtil.css';
import App from './App.vue';

createApp(App).mount('#app');

Vanilla HTML

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" 
        href="https://cdn.jsdelivr.net/npm/newtil-css@latest/dist/newtil.css">
</head>
<body>
  <div class="flex items-center">Hello</div>
</body>
</html>

빠른 시작

CDN을 사용하면 바로 시작할 수 있습니다

<link 
  rel="stylesheet" 
  href="https://cdn.jsdelivr.net/npm/newtil-css@latest/dist/newtil.css"
/>