tokvista 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist/index.cjs +126 -44
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +124 -42
- package/dist/styles.css +1100 -136
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -137,8 +137,24 @@ Need a full setup guide? See **[GUIDE.md](./GUIDE.md)**.
|
|
|
137
137
|
| `title` | `string` | `"Design Tokens"` | Main header title |
|
|
138
138
|
| `subtitle` | `string` | `"View and copy design tokens"` | Subtitle text |
|
|
139
139
|
| `darkMode` | `boolean` | `false` | Initial theme state |
|
|
140
|
+
| `fontFamilySans` | `string` | `undefined` | Override the UI sans font-family (CSS value). Load the font in your app. |
|
|
141
|
+
| `fontFamilyMono` | `string` | `undefined` | Override the UI mono font-family (CSS value). Load the font in your app. |
|
|
142
|
+
| `loadDefaultFonts` | `boolean` | `true` | When `true`, loads Inter + JetBrains Mono from Google Fonts. Set `false` to use only your app fonts. |
|
|
140
143
|
| `onTokenClick` | `(token) => void` | `undefined` | Callback when a token is clicked |
|
|
141
144
|
|
|
145
|
+
### Custom Fonts
|
|
146
|
+
|
|
147
|
+
You can use your app's fonts by disabling the default fonts and passing your own font-family values.
|
|
148
|
+
|
|
149
|
+
```tsx
|
|
150
|
+
<TokenDocumentation
|
|
151
|
+
tokens={tokens}
|
|
152
|
+
loadDefaultFonts={false}
|
|
153
|
+
fontFamilySans="'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
|
|
154
|
+
fontFamilyMono="'Fira Code', ui-monospace, 'SF Mono', Consolas, monospace"
|
|
155
|
+
/>
|
|
156
|
+
```
|
|
157
|
+
|
|
142
158
|
### Standalone Components
|
|
143
159
|
|
|
144
160
|
Use these to build custom layouts:
|