Skip to content

Commit da7563e

Browse files
committed
docs: Add theme section
1 parent f6d9017 commit da7563e

File tree

3 files changed

+52
-3
lines changed

3 files changed

+52
-3
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,42 @@ Allows users to sign in with an email and password:
181181
export class AppComponent { }
182182
```
183183
</details>
184+
185+
## Configuration
186+
187+
TODO: Update once configuration is finalized.
188+
189+
### Theming
190+
191+
FirebaseUI provides a basic default theme out of the box, however the theme can be customized to match your application's design.
192+
193+
The package uses CSS Variables, which can be overridden in your application's CSS. Below is a list of all available variables:
194+
195+
```css
196+
:root {
197+
/* The primary color is used for the button and link colors */
198+
--fui-primary: var(--color-black);
199+
/* The primary hover color is used for the button and link colors when hovered */
200+
--fui-primary-hover: --alpha(var(--fui-primary) / 85%);
201+
/* The primary surface color is used for the button text color */
202+
--fui-primary-surface: var(--color-white);
203+
/* The text color used for body text */
204+
--fui-text: var(--color-black);
205+
/* The muted text color used for body text, such as subtitles */
206+
--fui-text-muted: var(--color-gray-800);
207+
/* The background color of the cards */
208+
--fui-background: var(--color-white);
209+
/* The border color used for none input fields */
210+
--fui-border: var(--color-gray-200);
211+
/* The input color used for input fields */
212+
--fui-input: var(--color-gray-300);
213+
/* The error color used for error messages */
214+
--fui-error: var(--color-red-500);
215+
/* The radius used for the input fields */
216+
--fui-radius: var(--radius-sm);
217+
/* The radius used for the cards */
218+
--fui-radius-card: var(--radius-xl);
219+
}
220+
```
221+
222+
The default values are based on the [TailwindCSS](https://tailwindcss.com/docs/theme) theme variables. You can override these values with other TailwindCSS theme variables, or custom CSS values.

packages/angular/src/app/app.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import { SignUpAuthScreenComponent } from "@firebase-ui/angular";
44

55
@Component({
66
selector: 'app-root',
7-
imports: [RouterOutlet, SignUpAuthScreenComponent],
8-
templateUrl: './app.component.html',
9-
styleUrl: './app.component.css'
7+
imports: [SignUpAuthScreenComponent],
8+
template: `<fui-sign-up-auth-screen></fui-sign-up-auth-screen>`,
109
})
1110
export class AppComponent {
1211
title = 'angular-ssr';

packages/firebaseui-styles/src/base.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,27 @@
1414

1515
@layer theme {
1616
:root {
17+
/* The primary color is used for the button and link colors */
1718
--fui-primary: var(--color-black);
19+
/* The primary hover color is used for the button and link colors when hovered */
1820
--fui-primary-hover: --alpha(var(--fui-primary) / 85%);
21+
/* The primary surface color is used for the button text color */
1922
--fui-primary-surface: var(--color-white);
23+
/* The text color used for body text */
2024
--fui-text: var(--color-black);
25+
/* The muted text color used for body text, such as subtitles */
2126
--fui-text-muted: var(--color-gray-800);
27+
/* The background color of the cards */
2228
--fui-background: var(--color-white);
29+
/* The border color used for none input fields */
2330
--fui-border: var(--color-gray-200);
31+
/* The input color used for input fields */
2432
--fui-input: var(--color-gray-300);
33+
/* The error color used for error messages */
2534
--fui-error: var(--color-red-500);
35+
/* The radius used for the input fields */
2636
--fui-radius: var(--radius-sm);
37+
/* The radius used for the cards */
2738
--fui-radius-card: var(--radius-xl);
2839
}
2940
}

0 commit comments

Comments
 (0)