Difficulties installing franken-ui in a GoLang + Templ project #12
-
Hello everyone :) I am trying to install franken-ui for a project in GoLang+Templ to serve basic frontend, where I would love to use franken-ui for the styling and components. I have tried to follow the install docs for both CDN & NPM installation, and end up with no themeing being apllied. The following is placed in my html head tag when trying the CDN install method: <link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/css/slate.min.css"
/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/uikit.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/uikit-icons.min.js"></script> I do the following to try the NPM install method: bun install postcss franken-ui
npx franken-ui init -p I then update the tailwind config with the following (note the templ extension): import franken from 'franken-ui/shadcn-ui/preset-quick';
/** @type {import('tailwindcss').Config} */
export default {
presets: [franken({ theme: "slate" })],
content: [
"./**/*.{html,js,templ}",
],
safelist: [
{
pattern: /^uk-/
}
],
theme: {
extend: {}
},
plugins: []
}; And run the following to generate the final .css: npx tailwindcss -i ./input.css -o ./assets/css/styles.css --minify Both install methods, no matter what theme I pick, results in the default look: I am a bit of a rookie when it comes to npm, so I might just be doing something obviously wrong. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Your setup looks correct. But I think you forgot to send your HTML markup. Your button looks correct. So my hunch is there's some missing modifier? Anyway, try this gist I made. I use this for testing. |
Beta Was this translation helpful? Give feedback.
Your setup looks correct. But I think you forgot to send your HTML markup. Your button looks correct. So my hunch is there's some missing modifier? Anyway, try this gist I made. I use this for testing.
kitchen-sink.zip