[ Home ]
back

htmx + tailwindcss

id: 125, 2024-08-22

概要:

htmx + tailwindcss 構成になります。

  • bundler は、Viteを使用する例です。

[ 作成日: 2024/08/22 ]


構成

  • htmx
  • Vite:5.2
  • typescript: 5.4
  • express
  • tailwindcss

関連


作成したコード


  • example/tailwind/src/index.css
@tailwind base;
@tailwind components;
@tailwind utilities;

import renderLayout from "./renderLayout";
//
export default function Page(props: any) { 
  //
  const htm = `
  <h1 class="text-4xl font-bold my-2">hello</h1>
  `;
  return renderLayout({children: htm, title: "Home"});
}