Skip to content

Commit 0a28ced

Browse files
authored
chore: migrate skeleton, image, and accessible icon components to vanilla-extract
1 parent ad1e4f3 commit 0a28ced

25 files changed

+1069
-303
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66

77
Faency is a React component library and design system for Traefik Labs, built with React, TypeScript, Stitches CSS-in-JS, and Radix UI Primitives. It provides accessible, themed components with light/dark mode support.
88

9-
**Migration Status**: Currently migrating from Stitches to vanilla-extract (Phase 2 complete). Most components use Stitches (`.tsx`), some have vanilla-extract versions (`.vanilla.tsx`). Prefer editing Stitches versions unless explicitly migrating. See `VANILLA_EXTRACT_MIGRATION.md` for migration status and `VANILLA_EXTRACT_DEVELOPER_GUIDE.md` for comprehensive migration instructions.
9+
**Migration Status**: Currently migrating from Stitches to vanilla-extract (Phase 3 in progress). Most components use Stitches (`.tsx`), some have vanilla-extract versions (`.vanilla.tsx`). Prefer editing Stitches versions unless explicitly migrating. See `VANILLA_EXTRACT_MIGRATION.md` for migration status and `VANILLA_EXTRACT_DEVELOPER_GUIDE.md` for comprehensive migration instructions.
1010

1111
## Development Commands
1212

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This is the React component library and design system for [Traefik Labs](https://traefik.io).
44

5-
Built with React, Typescript, [Stitches](https://github.com/modulz/stitches) and [Radix UI Primitives](https://radix-ui.com/primitives/docs/overview/introduction).
5+
Built with React, Typescript, [Stitches](https://github.com/modulz/stitches), [vanilla-extract](https://vanilla-extract.style/) (migration in progress), and [Radix UI Primitives](https://radix-ui.com/primitives/docs/overview/introduction).
66

77
## Demo (Storybook)
88

@@ -46,9 +46,9 @@ const Container = styled(Flex, {
4646
const MyComponent = () => <Container>{children}</Container>;
4747
```
4848

49-
#### Using Vanilla Extract Components (New - Recommended)
49+
#### Using Vanilla Extract Components (Migration in Progress)
5050

51-
For better performance with static CSS, use the new Vanilla Extract components:
51+
For better performance with static CSS, you can use the new Vanilla Extract components (many components are available, more being migrated).
5252

5353
1. Import the CSS file in your app's entry point:
5454

@@ -57,6 +57,7 @@ import '@traefik-labs/faency/dist/style.css';
5757
```
5858

5959
2. Wrap your app with the VanillaExtractThemeProvider:
60+
Wrap your app with the VanillaExtractThemeProvider:
6061

6162
```jsx
6263
import { VanillaExtractThemeProvider } from '@traefik-labs/faency';
@@ -71,11 +72,11 @@ const App = () => (
7172
);
7273
```
7374

74-
> **Note**: Vanilla Extract components use static CSS generated at build time, providing better performance than runtime CSS-in-JS. Components with the `Vanilla` suffix (e.g., `BadgeVanilla`, `BoxVanilla`) require the CSS import above.
75+
> **Note**: Vanilla Extract components use static CSS generated at build time, providing better performance than runtime CSS-in-JS. CSS is automatically included when you import components - no separate CSS import needed. Components with the `Vanilla` suffix (e.g., `BadgeVanilla`, `BoxVanilla`) are available. Not all components have Vanilla Extract versions yet - check the component documentation or use the Stitches version if a Vanilla version is not available.
7576
7677
## How to contribute
7778

78-
- Make sure you have Node 18+, or if you prefer, you can work in a Docker container:
79+
- Make sure you have Node 20+, or if you prefer, you can work in a Docker container:
7980

8081
```sh
8182
docker run -it -v $(pwd):/usr/local/src/ -w /usr/local/src/ -p 3000:3000 node:latest bash

USER_GUIDE.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,14 @@ function App() {
6363
export default App;
6464
```
6565

66-
#### Using Vanilla Extract Components (New - Recommended)
66+
#### Using Vanilla Extract Components (Migration in Progress)
6767

68-
For Vanilla Extract components, import the CSS file and use the `VanillaExtractThemeProvider`:
68+
For Vanilla Extract components, use the `VanillaExtractThemeProvider`:
6969

7070
```tsx
7171
import React from 'react';
72-
import '@traefik-labs/faency/dist/style.css'; // Required for Vanilla Extract components
73-
import { VanillaExtractThemeProvider } from '@traefik-labs/faency';
74-
import { BoxVanilla, BadgeVanilla } from '@traefik-labs/faency';
72+
import { VanillaExtractThemeProvider } from '@traefiklabs/faency';
73+
import { BoxVanilla, BadgeVanilla } from '@traefiklabs/faency';
7574

7675
function App() {
7776
return (
@@ -86,21 +85,28 @@ function App() {
8685
export default App;
8786
```
8887

88+
> **Note**: CSS is automatically included when you import Vanilla Extract components - no separate CSS import needed.
89+
8990
### Import Styles
9091

9192
#### For Stitches Components (Legacy)
9293

9394
Stitches components use runtime CSS-in-JS, so no separate CSS imports are needed. Styles are automatically injected when you use components.
9495

95-
#### For Vanilla Extract Components (New - Recommended)
96+
#### For Vanilla Extract Components (Migration in Progress)
9697

98+
<<<<<<< HEAD
9799
Vanilla Extract components require importing the static CSS file. Add this import to your application's entry point (e.g., `App.tsx` or `index.tsx`):
98100

99101
```tsx
100102
import '@traefik-labs/faency/dist/style.css';
101103
```
102104

103-
This CSS file contains all the styles for Vanilla Extract components (components with `Vanilla` suffix like `BadgeVanilla`, `BoxVanilla`, etc.). Without this import, these components will render as unstyled elements.
105+
# This CSS file contains all the styles for Vanilla Extract components (components with `Vanilla` suffix like `BadgeVanilla`, `BoxVanilla`, etc.). Without this import, these components will render as unstyled elements.
106+
107+
Vanilla Extract components include their CSS automatically when imported. No separate CSS import is required - styles are bundled with each component module.
108+
109+
> > > > > > > 3186cd9 (chore: fix usage docs)
104110
105111
---
106112

0 commit comments

Comments
 (0)