# 9UI Documentation Beautiful, customizable components built with Base UI and Tailwind CSS. This is a curated set of components that you can customize to fit your style. You won't install it through npm - instead, you simply select the components you need and add them directly to your project. ## Getting Started ### Astro Setting up dark mode in your Astro project. **Create script to handle theme.** ```astro {5-28} title="src/pages/index.astro" --- import '../styles/global.css'; ---
{/* content */} ``` **Create theme utilies.** Create a utility to handle theme management. ```ts title="src/utils/theme.ts" export type Theme = "light" | "dark" | "system" export function getTheme(): Theme { if (typeof localStorage !== "undefined" && localStorage.getItem("theme")) { return localStorage.getItem("theme") as Theme } return "system" } export function setTheme(theme: Theme) { const isDark = theme === "dark" || (theme === "system" && window.matchMedia("(prefers-color-scheme: dark)").matches) document.documentElement.classList[isDark ? "add" : "remove"]("dark") } ``` **Add theme toggle component.** ```tsx title="src/components/theme-toggle.tsx" import * as React from "react" import { MoonIcon, SunIcon } from "lucide-react" import { getTheme, setTheme, type Theme } from "../utils/theme" import { Button } from "./ui/button" export function ThemeToggle() { const [theme, setCurrentTheme] = React.useStatemultiple prop to the
accordion.
multiple prop to the accordion to allow
multiple items to be opened at the same time.
You can invite up to 10 team members. You have 8 invites left.
Karen Smith
karen@9ui.dev
Chris Williams
chris@9ui.dev
{emoji} {label}
)) }} >{emoji} {label}
)) }} >{children}
)} />{error}
} {phoneNumber && !error && (Valid phone number entered
)}
This is a preview card component from{" "}
Beautiful, customizable components built with{" "} Base UI {" "} and{" "} Tailwind CSS .
9ui is a component library for building modern web applications.
Website
Documentation
Community