DEV Community

Serey Vatanak
Serey Vatanak

Posted on

 

How do you config custom theme in twind config file?

The official fresh website is open source and simply puts it at the root of the project.

twind.config.ts

import { Options } from "$fresh/plugins/twind.ts";

export default {
  selfURL: import.meta.url,
  theme: {
    extend: {
      colors: {
        primary: "#0b486b",
        secondary: "#106799",
        transparent: "transparent",
      },
    },
  },
} as Options;
Enter fullscreen mode Exit fullscreen mode

References:

Oldest comments (0)

Why You Need to Study Javascript Fundamentals

The harsh reality for JS Developers: If you don't study the fundamentals, you'll be just another “Coder”. Top learnings on how to get to the mid/senior level faster as a JavaScript developer by Dragos Nedelcu.