Skip to content

Commit c1aba7a

Browse files
committed
feat(ui-icons-lucide): add lucide icons
1 parent 89300c6 commit c1aba7a

21 files changed

+3819
-311
lines changed

docs/guides/upgrade-guide.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@ TODO add details
1414

1515
InstUI has switched to a new icon set, [Lucide](https://lucide.dev/icons/). We are still keeping some Instructure-specific icons, like product logos. We have a codemod that will help you migrate your code to the new icon set (see below).
1616

17+
### Lucide Icons Package
18+
19+
InstUI v12 introduces a new icon package **`@instructure/ui-icons-lucide`** based on the [Lucide](https://lucide.dev/icons/) icon library, providing 1,700+ icons with improved theming and RTL support. The new Lucide icons are wrapped with `wrapLucideIcon` to integrate with InstUI's theming system while maintaining access to all native Lucide props.
20+
21+
**Key differences from `SVGIcon`/`InlineSVG`:**
22+
23+
| Property | Old API (SVGIcon) | New API (Lucide) |
24+
| :-------------- | :---------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------- |
25+
| **size** | `'x-small'` \| `'small'` \| `'medium'` \| `'large'` \| `'x-large'` | `'xs'` \| `'sm'` \| `'md'` \| `'lg'` \| `'xl'` \| `'2xl'` \| `number` (pixels) |
26+
| **color** | Limited tokens: `'primary'` \| `'secondary'` \| `'success'` \| `'error'` \| `'warning'` \| etc. | 60+ theme tokens (`'baseColor'`, `'successColor'`, `'actionPrimaryBaseColor'`, etc.) or any CSS color |
27+
| **strokeWidth** | ❌ Not available | `'xs'` \| `'sm'` \| `'md'` \| `'lg'` \| `'xl'` \| `'2xl'` \| `number` \| `string` |
28+
| **children** | `React.ReactNode` | ❌ Removed |
29+
| **focusable** | `boolean` | ❌ Removed |
30+
| **description** | `string` (combined with title) | ❌ Removed (use `title` only) |
31+
| **src** | `string` | ❌ Removed |
32+
33+
The new icons automatically sync with theme changes, support all InstUI color tokens, and provide better TypeScript integration. All standard HTML and SVG attributes can be passed directly to Lucide icons and will be spread onto the nested SVG element. Existing `@instructure/ui-icons` package remains available for legacy Instructure-specific icons.
34+
1735
## Removal of deprecated props/components/APIs
1836

1937
## API Changes

packages/__docs__/components.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export { View, ContextView } from '@instructure/ui-view'
123123
export { Tray } from '@instructure/ui-tray'
124124
export { Spinner } from '@instructure/ui-spinner'
125125
export * from '@instructure/ui-icons'
126+
export * from '@instructure/ui-icons-lucide'
126127
// eslint-disable-next-line no-restricted-imports
127128
export { Guidelines } from './src/Guidelines'
128129
// eslint-disable-next-line no-restricted-imports

packages/__docs__/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"@instructure/ui-heading": "workspace:*",
6565
"@instructure/ui-i18n": "workspace:*",
6666
"@instructure/ui-icons": "workspace:*",
67+
"@instructure/ui-icons-lucide": "workspace:*",
6768
"@instructure/ui-img": "workspace:*",
6869
"@instructure/ui-instructure": "workspace:*",
6970
"@instructure/ui-link": "workspace:*",
@@ -121,6 +122,7 @@
121122
"moment": "^2.30.1",
122123
"react": "18.3.1",
123124
"react-dom": "18.3.1",
125+
"react-window": "^2.2.3",
124126
"semver": "^7.7.2",
125127
"uuid": "^11.1.0",
126128
"webpack-merge": "^6.0.1"

0 commit comments

Comments
 (0)