@drmhse/authos-vue 0.2.0 → 0.2.1
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 +34 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -398,7 +398,40 @@ export default defineEventHandler(async (event) => {
|
|
|
398
398
|
|
|
399
399
|
## Styling
|
|
400
400
|
|
|
401
|
-
|
|
401
|
+
AuthOS components come with **polished default styling** out of the box, similar to best-in-class auth providers. The styling is fully customizable via the `appearance` option or by overriding CSS variables.
|
|
402
|
+
|
|
403
|
+
### Customization
|
|
404
|
+
|
|
405
|
+
You can customize the theme colors, fonts, and more by passing an `appearance` object to `createAuthOS`.
|
|
406
|
+
|
|
407
|
+
```ts
|
|
408
|
+
app.use(createAuthOS({
|
|
409
|
+
// ... other options
|
|
410
|
+
appearance: {
|
|
411
|
+
variables: {
|
|
412
|
+
colorPrimary: '#0066cc',
|
|
413
|
+
colorBackground: '#f5f5f5',
|
|
414
|
+
borderRadius: '0.25rem',
|
|
415
|
+
fontFamily: 'Inter, sans-serif',
|
|
416
|
+
},
|
|
417
|
+
},
|
|
418
|
+
}));
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### CSS Variables
|
|
422
|
+
|
|
423
|
+
You can also override these CSS variables in your own stylesheet:
|
|
424
|
+
|
|
425
|
+
```css
|
|
426
|
+
:root {
|
|
427
|
+
--authos-color-primary: #0066cc;
|
|
428
|
+
--authos-border-radius: 4px;
|
|
429
|
+
}
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### Headless Styling
|
|
433
|
+
|
|
434
|
+
If you prefer to completely style the components yourself, you can target the data attributes. The default styles have low specificity, so your CSS classes will easily override them.
|
|
402
435
|
|
|
403
436
|
```css
|
|
404
437
|
[data-authos-signin] { /* Container */ }
|