···11+# 🦊 fox ui
22+33+> **This is a public alpha release. Expect bugs and breaking changes.**
44+55+svelte v5 + tailwind v4
66+77+[See all components here](https://flo-bit.dev/ui-kit)
88+99+Read more about [the philosophy/aim of this project here](https://flo-bit.dev/ui-kit/docs/philosophy).
1010+1111+## Quickstart
1212+1313+### 1. Create a new svelte project with tailwind css (including `@tailwindcss/typography` and `@tailwindcss/forms` plugins)
1414+1515+```bash
1616+npx sv create my-project
1717+```
1818+1919+### 2. Install fuchs-ui
2020+2121+```bash
2222+npm install @fuxui/base
2323+```
2424+2525+### 3. set theme variables in your app.css (changing `zinc` and `emerald` to your preferred colors, using find and replace).
2626+2727+```css
2828+@source "../node_modules/@fuxui";
2929+3030+@theme {
3131+ --color-base-50: var(--color-zinc-50);
3232+ --color-base-100: var(--color-zinc-100);
3333+ --color-base-200: var(--color-zinc-200);
3434+ --color-base-300: var(--color-zinc-300);
3535+ --color-base-400: var(--color-zinc-400);
3636+ --color-base-500: var(--color-zinc-500);
3737+ --color-base-600: var(--color-zinc-600);
3838+ --color-base-700: var(--color-zinc-700);
3939+ --color-base-800: var(--color-zinc-800);
4040+ --color-base-900: var(--color-zinc-900);
4141+ --color-base-950: var(--color-zinc-950);
4242+4343+ --color-accent-50: var(--color-emerald-50);
4444+ --color-accent-100: var(--color-emerald-100);
4545+ --color-accent-200: var(--color-emerald-200);
4646+ --color-accent-300: var(--color-emerald-300);
4747+ --color-accent-400: var(--color-emerald-400);
4848+ --color-accent-500: var(--color-emerald-500);
4949+ --color-accent-600: var(--color-emerald-600);
5050+ --color-accent-700: var(--color-emerald-700);
5151+ --color-accent-800: var(--color-emerald-800);
5252+ --color-accent-900: var(--color-emerald-900);
5353+ --color-accent-950: var(--color-emerald-950);
5454+}
5555+```
5656+5757+### 4. Use the components
5858+5959+```svelte
6060+<script>
6161+ import { Button } from '@fuxui/base';
6262+</script>
6363+6464+<Button onclick={() => alert('clicked')}>Click me</Button>
6565+```
6666+6767+## Development
6868+6969+If you want to contribute to the project, please open an issue first describing the feature you want to add.
7070+7171+Clone the repo, install dependencies and run the dev server
7272+7373+```bash
7474+git clone https://github.com/flo-bit/ui-kit.git
7575+cd ui-kit
7676+pnpm install
7777+pnpm run dev
7878+```
7979+8080+The ui-kit library is located in `packages/` (`packages/base` for the base package), the documentation is in `apps/docs`.
···11+import adapter from '@sveltejs/adapter-static';
22+import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
33+44+/** @type {import('@sveltejs/kit').Config} */
55+const config = {
66+ // Consult https://svelte.dev/docs/kit/integrations
77+ // for more information about preprocessors
88+ preprocess: vitePreprocess(),
99+1010+ kit: {
1111+ // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
1212+ // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
1313+ // See https://svelte.dev/docs/kit/adapters for more information about adapters.
1414+ adapter: adapter()
1515+ }
1616+};
1717+1818+export default config;
+19
packages/text/tsconfig.json
···11+{
22+ "extends": "./.svelte-kit/tsconfig.json",
33+ "compilerOptions": {
44+ "allowJs": true,
55+ "checkJs": true,
66+ "esModuleInterop": true,
77+ "forceConsistentCasingInFileNames": true,
88+ "resolveJsonModule": true,
99+ "skipLibCheck": true,
1010+ "sourceMap": true,
1111+ "strict": true,
1212+ "moduleResolution": "bundler"
1313+ }
1414+ // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
1515+ // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
1616+ //
1717+ // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
1818+ // from the referenced tsconfig.json - TypeScript does not merge them in
1919+}
+7
packages/text/vite.config.ts
···11+import tailwindcss from '@tailwindcss/vite';
22+import { sveltekit } from '@sveltejs/kit/vite';
33+import { defineConfig } from 'vite';
44+55+export default defineConfig({
66+ plugins: [tailwindcss(), sveltekit()]
77+});
+26
packages/text/scripts/cleanup.js
···11+import { readFileSync, writeFileSync } from 'fs';
22+33+/**
44+ * This script utilizes a property called "publishOverrides" in the package.json
55+ * to override specific properties in the package.json when publishing to npm.
66+ */
77+const cleanPackage = () => {
88+ let packageJson = JSON.parse(
99+ readFileSync('./package.json', {
1010+ encoding: 'utf-8'
1111+ })
1212+ );
1313+1414+ packageJson = {
1515+ ...packageJson,
1616+ ...packageJson.publishOverrides
1717+ };
1818+1919+ delete packageJson.publishOverrides;
2020+2121+ writeFileSync('./package.json', JSON.stringify(packageJson, null, 2), {
2222+ encoding: 'utf-8'
2323+ });
2424+};
2525+2626+cleanPackage();