diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts
index 17023ef932..8f75fa0050 100644
--- a/docs/.vitepress/config.ts
+++ b/docs/.vitepress/config.ts
@@ -28,6 +28,10 @@ export default defineConfig({
new URL('./theme/components/overrides/VPFooter.vue', import.meta.url),
),
},
+ {
+ find: '~/.vitepress',
+ replacement: fileURLToPath(new URL('./', import.meta.url)),
+ },
],
},
},
diff --git a/docs/.vitepress/data/categoriesData.json b/docs/.vitepress/data/categoriesData.json
new file mode 100644
index 0000000000..03712cc237
--- /dev/null
+++ b/docs/.vitepress/data/categoriesData.json
@@ -0,0 +1,186 @@
+[
+ {
+ "name": "accessibility",
+ "title": "Accessibility"
+ },
+ {
+ "name": "account",
+ "title": "Accounts & access"
+ },
+ {
+ "name": "animals",
+ "title": "Animals"
+ },
+ {
+ "name": "arrows",
+ "title": "Arrows"
+ },
+ {
+ "name": "brands",
+ "title": "Brands"
+ },
+ {
+ "name": "buildings",
+ "title": "Buildings"
+ },
+ {
+ "name": "charts",
+ "title": "Charts"
+ },
+ {
+ "name": "communication",
+ "title": "Communication"
+ },
+ {
+ "name": "connectivity",
+ "title": "Connectivity"
+ },
+ {
+ "name": "currency",
+ "title": "Currency"
+ },
+ {
+ "name": "cursors",
+ "title": "Cursors"
+ },
+ {
+ "name": "design",
+ "title": "Design"
+ },
+ {
+ "name": "development",
+ "title": "Coding & development"
+ },
+ {
+ "name": "devices",
+ "title": "Devices"
+ },
+ {
+ "name": "emoji",
+ "title": "Emoji"
+ },
+ {
+ "name": "files",
+ "title": "File icons"
+ },
+ {
+ "name": "food-beverage",
+ "title": "Food & beverage"
+ },
+ {
+ "name": "furniture",
+ "title": "Furniture"
+ },
+ {
+ "name": "gaming",
+ "title": "Gaming"
+ },
+ {
+ "name": "home",
+ "title": "Home"
+ },
+ {
+ "name": "layout",
+ "title": "Layout"
+ },
+ {
+ "name": "mail",
+ "title": "Mail"
+ },
+ {
+ "name": "maps",
+ "title": "Maps"
+ },
+ {
+ "name": "maths",
+ "title": "Maths"
+ },
+ {
+ "name": "medical",
+ "title": "Medical"
+ },
+ {
+ "name": "money",
+ "title": "Money"
+ },
+ {
+ "name": "multimedia",
+ "title": "Multimedia"
+ },
+ {
+ "name": "nature",
+ "title": "Nature"
+ },
+ {
+ "name": "navigation",
+ "title": "Navigation"
+ },
+ {
+ "name": "notifications",
+ "title": "Notifications"
+ },
+ {
+ "name": "people",
+ "title": "People"
+ },
+ {
+ "name": "photography",
+ "title": "Photography"
+ },
+ {
+ "name": "science",
+ "title": "Science"
+ },
+ {
+ "name": "seasons",
+ "title": "Seasons"
+ },
+ {
+ "name": "security",
+ "title": "Security"
+ },
+ {
+ "name": "shapes",
+ "title": "Shapes"
+ },
+ {
+ "name": "shopping",
+ "title": "Shopping"
+ },
+ {
+ "name": "social",
+ "title": "Social"
+ },
+ {
+ "name": "sports",
+ "title": "Sports"
+ },
+ {
+ "name": "sustainability",
+ "title": "Sustainability"
+ },
+ {
+ "name": "text",
+ "title": "Text formatting"
+ },
+ {
+ "name": "time",
+ "title": "Time & calendar"
+ },
+ {
+ "name": "tools",
+ "title": "Tools"
+ },
+ {
+ "name": "transportation",
+ "title": "Transportation"
+ },
+ {
+ "name": "travel",
+ "title": "Travel"
+ },
+ {
+ "name": "weather",
+ "title": "Weather"
+ }
+]
\ No newline at end of file
diff --git a/docs/.vitepress/lib/createCodeExamples.ts b/docs/.vitepress/lib/codeExamples/createCodeExamples.ts
similarity index 76%
rename from docs/.vitepress/lib/createCodeExamples.ts
rename to docs/.vitepress/lib/codeExamples/createCodeExamples.ts
index ee9e4bd4fd..7848841c2e 100644
--- a/docs/.vitepress/lib/createCodeExamples.ts
+++ b/docs/.vitepress/lib/codeExamples/createCodeExamples.ts
@@ -10,18 +10,24 @@ type CodeExampleType = {
const getIconCodes = (): CodeExampleType => {
return [
{
- language: 'html',
- title: 'HTML',
- code: ``,
+ language: 'js',
+ title: 'Vanilla',
+ code: `\
+import { createIcons, icons } from 'lucide';
+
+createIcons({ icons });
+
+document.body.append('');\
+ `,
},
{
language: 'tsx',
title: 'React',
- code: `import { PascalCase } from 'lucide-react';
+ code: `import { $PascalCase } from 'lucide-react';
const App = () => {
return (
-
+ <$PascalCase />
);
};
@@ -32,11 +38,11 @@ export default App;
language: 'vue',
title: 'Vue',
code: `
-
+ <$PascalCase />
`,
},
@@ -44,20 +50,20 @@ export default App;
language: 'svelte',
title: 'Svelte',
code: `
-
+<$PascalCase />
`,
},
{
language: 'tsx',
title: 'Preact',
- code: `import { PascalCase } from 'lucide-preact';
+ code: `import { $PascalCase } from 'lucide-preact';
const App = () => {
return (
-
+ <$PascalCase />
);
};
@@ -67,11 +73,11 @@ export default App;
{
language: 'tsx',
title: 'Solid',
- code: `import { PascalCase } from 'lucide-solid';
+ code: `import { $PascalCase } from 'lucide-solid';
const App = () => {
return (
-
+ <$PascalCase />
);
};
@@ -82,16 +88,16 @@ export default App;
language: 'tsx',
title: 'Angular',
code: `// app.module.ts
-import { LucideAngularModule, PascalCase } from 'lucide-angular';
+import { LucideAngularModule, $PascalCase } from 'lucide-angular';
@NgModule({
imports: [
- LucideAngularModule.pick({ PascalCase })
+ LucideAngularModule.pick({ $PascalCase })
],
})
// app.component.html
-
+
`,
},
{
@@ -101,7 +107,7 @@ import { LucideAngularModule, PascalCase } from 'lucide-angular';
@import ('~lucide-static/font/Lucide.css');
-
+
`,
},
];
diff --git a/docs/.vitepress/lib/codeExamples/createLabCodeExamples.ts b/docs/.vitepress/lib/codeExamples/createLabCodeExamples.ts
new file mode 100644
index 0000000000..91b5190160
--- /dev/null
+++ b/docs/.vitepress/lib/codeExamples/createLabCodeExamples.ts
@@ -0,0 +1,161 @@
+import { bundledLanguages, type ThemeRegistration } from 'shikiji';
+import { getHighlighter } from 'shikiji';
+
+type CodeExampleType = {
+ title: string;
+ language: string;
+ code: string;
+}[];
+
+const getIconCodes = (): CodeExampleType => {
+ return [
+ {
+ language: 'js',
+ title: 'Vanilla',
+ code: `\
+import { createIcons, icons } from 'lucide';
+import { $Name } from '@lucide/lab';
+
+createIcons({
+ icons: {
+ $Name
+ }
+});
+
+document.body.append('');\
+ `,
+ },
+ {
+ language: 'tsx',
+ title: 'React',
+ code: `import { Icon } from 'lucide-react';
+import { $Name } from '@lucide/lab';
+
+const App = () => {
+ return (
+
+ );
+};
+
+export default App;
+`,
+ },
+ {
+ language: 'vue',
+ title: 'Vue',
+ code: `
+
+
+
+
+`,
+ },
+ {
+ language: 'svelte',
+ title: 'Svelte',
+ code: `
+
+
+`,
+ },
+ {
+ language: 'tsx',
+ title: 'Preact',
+ code: `import { Icon } from 'lucide-preact';
+import { $Name } from '@lucide/lab';
+
+const App = () => {
+ return (
+
+ );
+};
+
+export default App;
+`,
+ },
+ {
+ language: 'tsx',
+ title: 'Solid',
+ code: `import { Icon } from 'lucide-solid';
+import { $Name } from '@lucide/lab';
+
+const App = () => {
+ return (
+
+ );
+};
+
+export default App;
+`,
+ },
+ {
+ language: 'tsx',
+ title: 'Angular',
+ code: `// app.module.ts
+import { LucideAngularModule, $PascalCase } from 'lucide-angular';
+import { $Name } from '@lucide/lab';
+
+@NgModule({
+ imports: [
+ LucideAngularModule.pick({ $Name })
+ ],
+})
+
+// app.component.html
+
+`,
+ },
+ ];
+};
+
+export type ThemeOptions =
+ | ThemeRegistration
+ | { light: ThemeRegistration; dark: ThemeRegistration };
+
+const highLightCode = async (code: string, lang: string, active?: boolean) => {
+ const highlighter = await getHighlighter({
+ themes: ['github-light', 'github-dark'],
+ langs: Object.keys(bundledLanguages),
+ });
+
+ const highlightedCode = highlighter
+ .codeToHtml(code, {
+ lang,
+ themes: {
+ light: 'github-light',
+ dark: 'github-dark',
+ },
+ defaultColor: false,
+ })
+ .replace('shiki-themes', 'shiki-themes vp-code');
+
+ return `
+
+ ${lang}
+ ${highlightedCode}
+
`;
+};
+
+export default async function createCodeExamples() {
+ const codes = getIconCodes();
+
+ const codeExamplePromises = codes.map(async ({ title, language, code }, index) => {
+ const isFirst = index === 0;
+
+ const codeString = await highLightCode(code, language, isFirst);
+
+ return {
+ title,
+ language: language,
+ code: codeString,
+ };
+ });
+
+ return Promise.all(codeExamplePromises);
+}
diff --git a/docs/.vitepress/lib/codeExamples/highLightCode.ts b/docs/.vitepress/lib/codeExamples/highLightCode.ts
new file mode 100644
index 0000000000..ed51ce21bc
--- /dev/null
+++ b/docs/.vitepress/lib/codeExamples/highLightCode.ts
@@ -0,0 +1,32 @@
+import { bundledLanguages, type ThemeRegistration } from 'shikiji';
+import { getHighlighter } from 'shikiji';
+
+export type ThemeOptions =
+ | ThemeRegistration
+ | { light: ThemeRegistration; dark: ThemeRegistration };
+
+const highLightCode = async (code: string, lang: string, active?: boolean) => {
+ const highlighter = await getHighlighter({
+ themes: ['github-light', 'github-dark'],
+ langs: Object.keys(bundledLanguages),
+ });
+
+ const highlightedCode = highlighter
+ .codeToHtml(code, {
+ lang,
+ themes: {
+ light: 'github-light',
+ dark: 'github-dark',
+ },
+ defaultColor: false,
+ })
+ .replace('shiki-themes', 'shiki-themes vp-code');
+
+ return `
+
+ ${lang}
+ ${highlightedCode}
+
`;
+};
+
+export default highLightCode;
diff --git a/docs/.vitepress/lib/codeExamples/types.ts b/docs/.vitepress/lib/codeExamples/types.ts
new file mode 100644
index 0000000000..1ab47b4696
--- /dev/null
+++ b/docs/.vitepress/lib/codeExamples/types.ts
@@ -0,0 +1,5 @@
+export type CodeExampleType = {
+ title: string;
+ language: string;
+ code: string;
+}[];
diff --git a/docs/.vitepress/theme/components/base/Checkbox.vue b/docs/.vitepress/theme/components/base/Checkbox.vue
new file mode 100644
index 0000000000..a13e9469aa
--- /dev/null
+++ b/docs/.vitepress/theme/components/base/Checkbox.vue
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/.vitepress/theme/components/home/TeamMemberCard.vue b/docs/.vitepress/theme/components/home/TeamMemberCard.vue
index 8d472e8ea5..44adef886d 100644
--- a/docs/.vitepress/theme/components/home/TeamMemberCard.vue
+++ b/docs/.vitepress/theme/components/home/TeamMemberCard.vue
@@ -3,7 +3,7 @@ export interface TeamMember {
name: string
title: string
image: string
- sponsor: string
+ sponsor?: string
socialLinks: DefaultTheme.SocialLink[]
}
diff --git a/docs/.vitepress/theme/components/icons/CategoryList.vue b/docs/.vitepress/theme/components/icons/CategoryList.vue
index 56dc570cf0..49452e2709 100644
--- a/docs/.vitepress/theme/components/icons/CategoryList.vue
+++ b/docs/.vitepress/theme/components/icons/CategoryList.vue
@@ -6,6 +6,7 @@ import { isActive } from 'vitepress/dist/client/shared'
import { useActiveAnchor } from '../../composables/useActiveAnchor'
import { data } from './CategoryList.data'
import CategoryListItem from './CategoryListItem.vue'
+import SidebarTitle from './SidebarTitle.vue'
import { useCategoryView } from '../../composables/useCategoryView'
const { page } = useData()
@@ -46,10 +47,13 @@ watch(headers, () => {
-