Open Source UI-TOOLS for Designer/Developer

1 min read
Table of contents

UI Tools is an open-source ui-tools for design engineers and developers. It's a creative toolbox featuring shadow, SVG, gradient, background pattern generators, and color. Open-source, fast, and made for builders.
Installation
You must install tailwindcss
. As most of our components use motion
install it too.
npm install motion clsx tailwind-merge
Must add it in the utils.ts
:
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
Use these hooks for mediaQueries:
import { useEffect, useState } from "react";
export function useMediaQuery(query: string) {
const [value, setValue] = useState(false);
useEffect(() => {
function onChange(event: MediaQueryListEvent) {
setValue(event.matches);
}
const result = matchMedia(query);
result.addEventListener("change", onChange);
setValue(result.matches);
return () => result.removeEventListener("change", onChange);
}, [query]);
return value;
}
Tools
0
Subscribe to my newsletter
Read articles from David Nguyen directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

David Nguyen
David Nguyen
A passionate full-stack developer from @ePlus.DEV