@fashionunited/starlight-plugin-theme
v0.1.0
Published
Shared FashionUnited Starlight theme plugin — blue-themed design system with UI components
Downloads
665
Readme
@fashionunited/starlight-plugin-theme
Shared FashionUnited Starlight theme plugin — blue-themed design system with UI components, Tailwind preset, and Starlight component overrides.
Installation
bun add @fashionunited/starlight-plugin-themeUsage
Starlight Plugin
Add the plugin to your astro.config.mjs:
import fashionunitedTheme from '@fashionunited/starlight-plugin-theme';
export default defineConfig({
integrations: [
starlight({
plugins: [fashionunitedTheme()],
// your site-specific config...
}),
],
});The plugin automatically injects:
- Base CSS (dark mode fix, gradients, sidebar active state)
- Global CSS variables (shadcn/ui color tokens)
- Font imports (Inter, Lora, IBM Plex Mono)
- Starlight component overrides (Head.astro with view transitions, PageTitle.astro with copy-page dropdown)
Tailwind Preset
Use the shared Tailwind preset in your tailwind.config.mjs:
import starlightPlugin from '@astrojs/starlight-tailwind';
import { fuThemePreset, accent, gray } from '@fashionunited/starlight-plugin-theme/tailwind-preset';
export default {
presets: [fuThemePreset],
plugins: [
starlightPlugin({ colors: { accent, gray } }),
require("@tailwindcss/typography"),
require("tailwindcss-animate"),
],
// site-specific overrides...
};UI Components
Import shared React components:
import { Button } from '@fashionunited/starlight-plugin-theme/components/ui/button';
import { Card } from '@fashionunited/starlight-plugin-theme/components/ui/card';
import { cn } from '@fashionunited/starlight-plugin-theme/lib/utils';Overriding Components
The plugin provides default Head.astro and PageTitle.astro components. To override them, add your own in your Starlight config — consumer overrides take precedence:
starlight({
plugins: [fashionunitedTheme()],
components: {
Head: './src/components/starlight/Head.astro', // overrides plugin's Head
},
})