Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: theme guide #25

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 29 additions & 12 deletions packages/frosted-ui/.storybook/stories/Introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import { Meta } from '@storybook/blocks';

# Welcome to Frosted UI

Frosted is the design system used and and built by [Whop](https://whop.com).

The system is built using:

- React + Typescript
- Radix UI
Frosted is the design system used by [Whop](https://whop.com) and heavily based on [Radix Themes](https://www.radix-ui.com/):

## Getting Started

Expand All @@ -21,7 +16,7 @@ The system is built using:

Import the global CSS file at the root of your application.

```CSS
```tsx
import 'frosted-ui/styles.css';
```

Expand All @@ -45,19 +40,41 @@ export default function () {
}
```

## 4. Start building
### 4. Start building

You are now ready to use Frosted UI components.
You are now ready to use Frosted UI components!

```tsx
import { Flex, Text, Button } from 'frosted-ui';
import { Flex, Heading, Button } from 'frosted-ui';

export default function MyApp() {
return (
<Flex direction="column" gap="2">
<Text>Hello from Frosted UI!</Text>
<Button>Let's go</Button>
<Heading>Frosted UI</Heading>
<Button>Start building</Button>
</Flex>
);
}
```

## Customizing your theme

Configuration is managed and applied via the `<Theme />` component.

```tsx
<Theme
// Sets Light or Dark mode
appearance="dark"
// Neutral color of the UI
grayColor="slate"
// Accent color (mainly used as a default color for interactive elements)
accentColor="iris"
// Semantic colors
infoColor="sky"
successColor="green"
warningColor="yellow"
dangerColor="red"
>
{children}
</Theme>
```