|
1 | | -# Typed CSS X |
| 1 | +# Typed cssx |
2 | 2 |
|
3 | | -**Zero-runtime CSS in JS and Compiler** |
| 3 | +### Zero-runtime CSS in TS Compiler |
4 | 4 |
|
5 | | -Typed CSS X is an innovative CSS-in-JS solution designed for the Next.js App Router (RSC). |
| 5 | +Typed CSS X is an innovative CSS in TypeScript solution designed for the Next.js App Router (RSC). |
6 | 6 | Key features: |
7 | 7 |
|
8 | | -- Zero-runtime (statically generated during build time) |
9 | | -- type check (compile time and autocomplete) |
10 | | -- RSC support |
11 | | -- Hot Reload |
| 8 | +- TypeScript first: Write CSS in a high level, easy to read TypeScript format. |
| 9 | +- Type safety: Enjoy compile time checks and intelligent autocompletion while writing styles. |
| 10 | +- Hot Reloading: Experience a smooth development workflow with instant feedback as you edit styles. |
| 11 | +- Pure CSS compiler: 100% pure CSS compiler, outputting static CSS files without a runtime. |
| 12 | +- Zero-runtime: All CSS is statically generated during build time, high performance in production. |
| 13 | +- Next.js RSC support: Full support for the Next.js App Router and React Server Components (RSC). |
12 | 14 |
|
13 | | -To explore detailed documentation, visit our [typedcssx site](https://typedcssx.vercel.app/). |
14 | | -Check out our [release notes](https://github.com/typedcsslab/typedcssx/releases) for the latest version information and updates. |
| 15 | +## Why Typed cssx? |
| 16 | + |
| 17 | +Typed cssx allows you to write CSS as TypeScript, making your styles type safe and maintainable |
| 18 | +and integrated with your development environment. With features like static CSS generation |
| 19 | +high performance while keeping your CSS code clean and scalable. |
| 20 | + |
| 21 | +### Let's write CSS in TypeScript |
| 22 | + |
| 23 | +For detailed documentation, visit our [typedcssx site](https://typedcssx.vercel.app/). |
| 24 | +For the check out the latest version information, visit our [release notes](https://github.com/typedcsslab/typedcssx/releases). |
15 | 25 |
|
16 | 26 | ## Quick Start |
17 | 27 |
|
18 | 28 | ```typescript |
19 | | -// Header.css.tsx |
20 | | -import Style from 'typedcssx'; |
| 29 | +import cssx from 'typedcssx'; |
21 | 30 |
|
22 | | -const styles = Style.create({ |
23 | | - header: { |
| 31 | +const css = cssx.create({ |
| 32 | + blue: { |
24 | 33 | fontSize: 18, |
25 | 34 | color: 'blue', |
26 | 35 | }, |
27 | 36 | }); |
28 | 37 |
|
29 | | -const Header = () => <header className={styles.header}>Hello, Typed CSS X!</header>; |
| 38 | +const Header = () => <header className={css.blue}>Hello, Typed CSS X!</header>; |
30 | 39 | ``` |
0 commit comments