docs(version-1): Version 1 website (#4142)

* Update images

* Adjust color

* update accessebility

* Add matrix hero

* Add typescript documentation

* Add basics section to vue pages

* Add svelte docs

* Fix dynamic sidebar

* Add animation?

* Some adjustments

* Adjust animation

* Updates docs

* Add scaledown animation

* Add docs for vue types

* Fix layout accessibility page

* fix framework select

* adjust easing home animation

* Write docs for Vue

* Adjust animation home

* Adjust home hero animation

* Finish svelte docs

* Add solid pages

* remove spiral animation component

* Add group icons

* Added solid docs

* update preact docs

* Adjust examples preact docs

* Add snackplayer

* Get new editor

* Save this

* Add examples

* Adjust styling

* setup custom sandpack

* Add script

* Format files

* Make sandpack plugin work

* migrate react docs

* Fix svelte and solid examples

* Migrate to solid packages

* Add darkmode package logos

* Fix bug in selector

* migrate vue examples

* migrate advanced vue items

* migrate preact and svelte examples

* Add astro docs

* adding more docs on guide for lucide library

* Fix home animation

* Cleanup

* Added resources page, with more details and content

* Add hero badge for Version 1

* Fix vercel json

* Update missing paths

* Fix build?

* Replace lucide-vue-next

* Fix build

* Add some docs

* update markdown

* Setup angular docs

* Add basic angular docs

* Adjust code examples

* Update title and descriptions

* Update accessibility link

* Update title and description

* Add og image

* Fix alignment

* Add migration guides

* Adjust version 1 markdown file

* Add migration guide to the main list

* Minor fixes

* Update docs

* Apply feedback

* Select icons

* Add pointer events none

* Fix package links homepage

* Format code

* Fix types

* Fix focus

* Fix build

* Fix focus

* Apply feedback

* Adjust imports

* Adjust imports

* Fix search

* Apply feedback

* Fix import in font docs

* Small fixes

* docs(guide): added easter egg icon. stay tuned, guys 😉

* Add llm txt plugin

* Adjust logo top

* docs(version-1): upgraded @lucide/angular guide for v1 website (#4144)

* docs(guide/angular): rewrite some angular documentation

* docs(guide/angular): extens angular guide with combining icons & icon provider guides

* docs(guide/angular): fix angular sandbox, still needs @lucide/angular release tho

* docs(guide/angular): rework the getting started page a bit more, refactor some more prop=>input occurences

* docs(guide/angular): context provider => provideLucideConfig

* Update docs/guide/angular/migration.md

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>

* Update docs/guide/angular/advanced/combining-icons.md

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* docs(guide/angular): rework a11y for better flow & pacing

* docs(guide/angular): salvage original phrase, it has better flow

* docs(guide/angular): some more a11y nitpicking

* docs(guide/angular): reduce llm fatigue

* docs(guides/angular): fix app component selector

* docs(guides/angular): fix angular sandpacks

* Add sandpack angular to improve tree-shakable stack

* Update docs/guide/angular/getting-started.md

* docs(guides/angular): fix user import in combinding icons guide

* docs(guides/angular): fix nested SVG phrasing

* Update docs/guide/angular/advanced/with-lucide-lab.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/guide/angular/advanced/filled-icons.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docs(guides/angular): fix createLucideIcon guide

* docs(guides/angular): upgrade all relevant angular sandpack demos

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix(docs): add autogenerated OG images to gitignore

* fix(docs): unify the case of "Lucide" & "Lucide Lab" over all docs and readmes

* Fix build

* Add next tag to all installation guides

* Add top bar notification

* Minor fixes

* Update text

* Add todos

* Update og image

* Adjust install command

* Color top bar

* fix(docs): ignore all OG images, expect general.png

* fix(docs): fix the package list, hide @lucide/icons, downgrade angular logo, link to v0 guide, fix package title alignment

* Update docs/.vitepress/theme/components/base/LayoutTop.vue

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/guide/react/advanced/dynamic-icon-component.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update CONTRIBUTING.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/.vitepress/sidebar/resources.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix code example

* fix(docs): version 1 => Version 1

* feat(docs): add angular to new features in v1

* Fix next line issue

* feat(docs): fix typo (code example_s_)

* Fix deadlink

* feat(docs): fix some more typos and irky grammar

* feat(docs): fix lowercase lucide in sidebar 😅

* Update docs/guide/version-1.md

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Eric Fennis
2026-03-20 17:04:28 +01:00
committed by GitHub
co-authored by Copilot Autofix powered by AI Karsa
parent e715245d62
commit 484f2c9cd3
314 changed files with 15456 additions and 2313 deletions
@@ -0,0 +1,52 @@
---
title: Accessibility - Astro
description: Best practices for accessible icons in your application.
---
<script setup>
import OverviewLink from '~/.vitepress/theme/components/base/OverviewLink.vue'
</script>
# Accessibility
Lucide icons ship with `aria-hidden="true"` by default. In almost all cases this is exactly what you want.
## Should icons be accessible?
Most of the time, icons are used purely for decoration or visual reinforcement. Exposing decorative icons to assistive technologies can create unnecessary noise for screen reader users.
For a broader explanation of this, and other best practices on how to use icons accessibly in your application, please refer to our detailed guide on accessibility:
<OverviewLink href="/guide/accessibility" title="Accessible Icons" desc="Best practices for accessible icons in your application."/>
Only if an icon **conveys essential meaning on its own** should it be made accessible. The sections below explain how to do that in Astro.
## Making an icon accessible
To expose an icon to assistive technologies, provide an accessible name by passing a `title` element as a child or passing the `aria-label` prop to the icon component.
This removes the `aria-hidden` attribute and makes the icon visible to screen readers.
```astro
<House>
<title>This is my house</title>
</House>
// or
<House aria-label="This is my house" />
```
Choose a label that clearly describes the meaning of the icon or the action it represents in the context of your application.
## Accessible icon buttons
When an icon is used inside a button, the accessible label should usually be applied to the button itself, and not the icon.
```astro
<button aria-label="Go to home">
<House />
</button>
```
This ensures assistive technologies describe the interactive element, rather than the decorative graphic inside it.
@@ -0,0 +1,44 @@
---
title: Global Styling - Astro
description: Learn how to apply global styling to Lucide icons in your Astro applications using CSS.
---
# Global Styling
Adjusting icons can be done by using [color](../basics/color.md), [size](../basics/sizing.md) and [stroke width](../basics/stroke-width.md).
To style all icons globally you can use CSS.
## Style by using CSS
Styling icons is easy to accomplish using CSS.
Every icon has a class attribute applied called `lucide`. This class name can be used in the CSS file to target all icons that are being used within the app.
- The **color** of the icons can be changed using the [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color) CSS property.
- The **size** of the icons can be changed using [`width`](https://developer.mozilla.org/en-US/docs/Web/CSS/width) and [`height`](https://developer.mozilla.org/en-US/docs/Web/CSS/height) CSS properties.
- The **stroke width** of the icons can be changed using the [`stroke-width`](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width) CSS property.
```css
.lucide {
color: #ffadff;
width: 56px;
height: 56px;
stroke-width: 1px;
}
```
### Absolute stroke width
For global absolute stroke width styling the `vector-effect: non-scaling-stroke` CSS property can be applied to the children. This will keep the stroke-width the same size no matter the size of the icon. See [absolute-stroke-width](../basics/stroke-width.md#absolute-stroke-width) for more info.
```css
.lucide {
width: 48px;
height: 48px;
stroke-width: 1.5;
}
.lucide * {
vector-effect: non-scaling-stroke;
}
```
+126
View File
@@ -0,0 +1,126 @@
---
title: TypeScript Support - Astro
description: Learn about the TypeScript types exported by the @lucide/astro package.
---
# TypeScript Support
List of exported types from the `@lucide/astro` package.
These can be used to type your components when using Lucide icons in a TypeScript Astro project.
## `LucideProps`
Exports all props that can be passed to an icon component and any other SVG attributes, see: [SVG Presentation Attributes on MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation).
```ts
interface LucideProps extends SVGAttributes<SVGSVGElement> {
name?: string;
color?: string;
size?: number | string;
'stroke-width'?: number | string;
absoluteStrokeWidth?: boolean;
[key: string]: any; // Any other SVG attributes
}
```
### Using `IconProps`
<!-- Rename this to LucideProps -->
You can use the `IconProps` interface to type props for your custom icon components.
```astro
---
import { icons, type IconProps } from '@lucide/astro';
interface Props extends IconProps {
name: keyof typeof icons;
}
const { name, ...restProps } = Astro.props;
const Icon = icons[name];
---
<Icon {...restProps} />
```
## `LucideIcon`
Type for individual icon components, this is use full when you want to type a variable or prop that holds an icon component.
```ts
import type { Component } from 'astro/types';
import type { IconProps } from '@lucide/astro';
type LucideIcon = Component<IconProps>
```
### Using `LucideIcon`
You can use the `LucideIcon` type when you need to work with icon components directly.
```astro
---
import { House, Library, Cog, type Icon as IconType } from '@lucide/astro';
type MenuItem = {
name: string;
href: string;
icon: typeof IconType;
};
const menuItems: MenuItem[] = [
{
name: 'Home',
href: '/',
icon: House,
},
{
name: 'Blog',
href: '/blog',
icon: Library,
},
{
name: 'Projects',
href: '/projects',
icon: Cog,
},
];
---
{
menuItems.map((item) => (
<a href={item.href}>
<item.icon />
<span>{item.name}</span>
</a>
))
}
```
## `IconNode`
Type for the raw SVG structure of an icon. This is an array of SVG elements and their attributes to render the icon.
Not commonly used directly in application code. But can be useful for advanced use cases, such as using custom icons or with Lucide Lab.
```ts
type IconNode = [
elementName: 'circle' | 'ellipse'| 'g' | 'line' | 'path' | 'polygon' | 'polyline' | 'rect',
attrs: HTMLAttributes<'svg'>
][];
```
### Using `IconNode`
You can use the `IconNode` type when you need to work with the raw SVG structure of an icon.
```astro [CustomIcon.astro]
---
import { type IconNode, Icon } from '@lucide/astro';
const customIcon: IconNode = [
['circle', { cx: 12, cy: 12, r: 10 }],
['line', { x1: 12, y1: 8, x2: 12, y2: 12 }],
['line', { x1: 12, y1: 16, x2: 12, y2: 16 }],
];
---
<Icon iconNode={customIcon} size="24" color="blue" />
```
@@ -0,0 +1,25 @@
---
title: With Lucide Lab or custom icons - Astro
description: Learn how to use Lucide Lab or custom icons in your Astro applications using the Icon component.
---
# With Lucide Lab or custom icons
[Lucide Lab](https://github.com/lucide-icons/lucide-lab) is a collection of icons that are not part of the Lucide main library.
They can be used by using the `Icon` component.
All props like regular lucide icons can be passed to adjust the icon appearance.
## Using the `Icon` component
This creates a single icon based on the iconNode passed and renders a Lucide icon component.
```astro
---
import { Icon } from '@lucide/astro';
import { burger, sausage } from '@lucide/lab';
---
<Icon iconNode={burger} />
<Icon iconNode={sausage} color="red"/>
```
+39
View File
@@ -0,0 +1,39 @@
---
title: Color - Astro
description: Learn how to customize the color of Lucide icons in your Astro applications using the color prop and CSS.
---
# Color
By default, all icons have the color value: `currentColor`. This keyword uses the element's computed text `color` value to represent the icon color.
Read more about [`currentColor` on MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#currentcolor_keyword).
## Adjust the color using the `color` prop
The color can be adjusted by passing the color prop to the element.
```astro /src/pages/index.astro
---
import Smile from '@lucide/astro/icons/smile';
---
<Smile color="#3e9392" />
```
## Using parent elements text color value
Because the color of lucide icons uses `currentColor`, the color of the icon depends on the computed `color` of the element, or it inherits it from its parent.
For example, if a parent element's color value is `#fff` and one of the children is a lucide icon, the color of the icon will be rendered as `#fff`. This is browser native behavior.
```astro /src/pages/index.astro
---
import ThumbsUp from '@lucide/astro/icons/thumbs-up';
---
<button style="color:#fff">
<ThumbsUp />
Like
</button>
```
+89
View File
@@ -0,0 +1,89 @@
---
title: Sizing - Astro
description: Learn how to adjust the size of Lucide icons in your Astro applications using the size prop and CSS.
---
# Sizing
By default, the size of all icons is `24px` by `24px`. The size is adjustable using the `size` prop and CSS.
## Adjusting the icon size using the `size` prop
```astro
---
import Landmark from '@lucide/astro/icons/landmark';
---
<Landmark size={64} />
```
## Adjusting the icon size via CSS
The CSS properties `width` and `height` can be used to adjust the icon size.
::: code-group
```css [icon.css]
.my-beer-icon {
width: 64px;
height: 64px;
}
```
```astro [page.astro]
---
import Beer from '@lucide/astro/icons/beer';
import './icon.css'
---
<Beer class="my-beer-icon" />
```
:::
### Dynamically change the icon size based on the font size
It is possible to resize icons based on font size. This can be achieved using the `em` unit. See this [MDN article](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size#ems) for more information on the `em` unit.
::: code-group
```css [icon.css]
.my-icon {
/* Icon size will relative to font-size of .text-wrapper */
width: 1em;
height: 1em;
}
.text-wrapper {
font-size: 96px;
/* layout stuff */
display: flex;
gap: 0.25em;
align-items: center;
}
```
```astro [page.astro]
---
import Star from '@lucide/astro/icons/star';
import './icon.css'
---
<div class="text-wrapper">
<Star class="my-icon" />
<div>Yes</div>
</div>
```
:::
### Resizing with Tailwind
`size-*` utilities can be used to adjust the size of the icon. See the [Tailwind documentation](https://tailwindcss.com/docs/width#setting-both-width-and-height) for more information on the `size-*` utilities.
```astro
---
import PartyPopper from '@lucide/astro/icons/party-popper';
---
<PartyPopper class="size-24" />
```
+46
View File
@@ -0,0 +1,46 @@
---
title: Stroke width - Astro
description: Learn how to customize the stroke width of Lucide icons in your Astro applications using the strokeWidth and absoluteStrokeWidth props.
---
# Stroke width
All icons are designed with SVG elements using strokes.
These have a default stroke width of `2px`.
The `strokeWidth` can be adjusted to create a different look of the icons.
## Adjusting stroke width with `strokeWidth` prop
```astro
---
import FolderLock from '@lucide/astro/icons/folder-lock';
---
<FolderLock strokeWidth={1} />
```
## Absolute stroke width
When adjusting the `size` prop the size of the stroke width will be relative to the size of the icon, this is the default SVG behavior. The `absoluteStrokeWidth` prop is introduced to adjust this behavior to make the stroke width constant no matter the size of the icon.
This means that when `absoluteStrokeWidth` is enabled and the `size` of the icons is set to `48px` the `strokeWidth` will still be `2px` on the screen.
Note `2px` is the default stroke width for a Lucide icon, this can be adjusted to all sizes.
![Absolute stroke width comparison](../../../images/absolute-stroke-width-compare.png?raw=true "Absolute stroke width comparison")
### Adjusting stroke width with `absoluteStrokeWidth` prop
Setting `absoluteStrokeWidth` to `true` will make the stroke width absolute.
```astro
---
import RollerCoaster from '@lucide/astro/icons/roller-coaster';
---
<RollerCoaster
size={96}
absoluteStrokeWidth
/>
```
+81
View File
@@ -0,0 +1,81 @@
---
title: Getting started - Astro
description: This guide will help you get started with Lucide in your Astro project.
---
<script setup>
import OverviewLink from '../../.vitepress/theme/components/base/OverviewLink.vue'
import OverviewLinkGrid from '../../.vitepress/theme/components/base/OverviewLinkGrid.vue'
import { astroSidebar } from '../../.vitepress/sidebar/astro'
</script>
# Getting started
This guide will help you get started with Lucide in your Astro project.
Make sure you have a Astro environment set up. If you don't have one yet, you can create a new Astro project using Vite, or any other Astro boilerplate of your choice.
## Installation
<!-- TODO: v1 Remove After full release -->
::: code-group
```sh [pnpm]
pnpm add @lucide/astro@next
```
```sh [yarn]
yarn add @lucide/astro@next
```
```sh [npm]
npm install @lucide/astro@next
```
```sh [bun]
bun add @lucide/astro@next
```
:::
## Importing your first icon
Lucide is built with ES Modules, so it's completely tree-shakable.
Each icon can be imported as an Astro component, which renders an inline SVG element. This way, only the icons that are imported into your project are included in the final bundle. The rest of the icons are tree-shaken away.
```astro
---
import { Camera } from '@lucide/astro';
---
<Camera />
```
## Props
To customize the appearance of an icon, you can use the following props:
| name | type | default |
| ----------------------- | --------- | ------------ |
| `size` | *number* | 24 |
| `color` | *string* | currentColor |
| `stroke-width` | *number* | 2 |
| `absoluteStrokeWidth` | *boolean* | false |
| `default-class` | *string* | lucide-icon |
Because icons render as SVG elements, all standard SVG attributes can also be applied as props. See the list of SVG Presentation Attributes on [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation).
```astro
---
import { Camera } from '@lucide/astro';
---
<Camera color="#ff3e98" size={48} stroke-width={1} />
```
More examples and details how to use props, continue the guide:
<OverviewLinkGrid>
<OverviewLink v-for="item in astroSidebar[1].items" :key="item.link" :href="item.link" :title="item.text" :desc="item.desc"/>
</OverviewLinkGrid>
+45
View File
@@ -0,0 +1,45 @@
---
title: Lucide for Astro
description: Learn how to use Lucide icons in your Astro applications with our comprehensive guide.
nextPage:
- getting-started
---
<script setup>
import OverviewLink from '../../.vitepress/theme/components/base/OverviewLink.vue'
import OverviewLinkGrid from '../../.vitepress/theme/components/base/OverviewLinkGrid.vue'
import { astroSidebar } from '../../.vitepress/sidebar/astro'
</script>
<!--@include: ../../../docs/images/package-logos/lucide-astro.svg -->
# Lucide for Astro
Astro components for Lucide icons that work perfectly with Astro's island architecture and multi-framework support. Each icon is an Astro component that renders as an inline SVG, providing excellent performance for static sites and server-side rendering scenarios.
List of features:
- **Easy to Use**: Import icons as Astro components and use them directly in your Astro application.
- **Customizable**: Adjust size, color, and other properties via props.
- **Tree-shakable**: Integrate seamlessly with Astro's component islands and partial hydration
- **TypeScript Support**: Fully typed components for better developer experience.
## Overview
<OverviewLinkGrid>
<OverviewLink v-for="item in astroSidebar[0].items.slice(1)" :key="item.link" :href="item.link" :title="item.text" :desc="item.desc"/>
</OverviewLinkGrid>
### Basics
{{''}}
<OverviewLinkGrid>
<OverviewLink v-for="item in astroSidebar[1].items" :key="item.link" :href="item.link" :title="item.text" :desc="item.desc"/>
</OverviewLinkGrid>
### Advanced
{{''}}
<OverviewLinkGrid>
<OverviewLink v-for="item in astroSidebar[2].items" :key="item.link" :href="item.link" :title="item.text" :desc="item.desc"/>
</OverviewLinkGrid>
+20
View File
@@ -0,0 +1,20 @@
# Migration from v0
Brand icons are removed in v1. If you are using any of the following icons, you will need to replace them with a custom SVG or an alternative icon:
- Chromium
- Codepen
- Codesandbox
- Dribbble
- Facebook
- Figma
- Framer
- Github
- Gitlab
- Instagram
- LinkedIn
- Pocket
- RailSymbol (based on the British Rail logo)
- Slack
We recommend to use the official SVG icons provided by the respective brands, most of them can be found on their websites or in their brand guidelines. Alternatively, you can use the icons from [Simple Icons](https://simpleicons.org/), which provides a large collection of brand icons. Also with links to the official Brand Guidelines and SVG icons.