Skip to content

Commit 0e0d337

Browse files
committed
Improve getting started section
1 parent 7001e66 commit 0e0d337

1 file changed

Lines changed: 48 additions & 3 deletions

File tree

packages/layerchart/src/routes/getting-started/+page.svelte

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<a href="https://tailwindcss.com/docs/guides/sveltekit" target="_blank">guide</a>.
4444
</p>
4545

46-
You can use LayerChart with your existing project, such as
46+
You can also use LayerChart within your existing project, such as
4747
<a href="https://www.skeleton.dev/" target="_blank">Skeleton</a>,
4848
<a href="https://www.shadcn-svelte.com/" target="_blank">shadcn-svelte</a>, or
4949
<a href="https://daisyui.com/" target="_blank">Daisy UI</a>. See
@@ -90,9 +90,54 @@
9090
<a
9191
href="https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-registering-sources"
9292
target="_blank">Tailwind</a
93-
>
93+
>.
9494
</div>
95-
<Code source={`@source '../../node_modules/layerchart/dist';`} language="css" />
95+
<Code
96+
source={`@import 'tailwindcss';
97+
@source '../node_modules/layerchart/dist';`}
98+
language="css"
99+
/>
100+
101+
<p>
102+
You will also need to add a few theme colors to your Tailwind config. This can be done
103+
explicitly (includig <a href="https://github.com/techniq/layerchart/issues/160" target="_blank"
104+
>mapping</a
105+
> to existing CSS variables of popular frameworks).
106+
</p>
107+
108+
<Code
109+
source={`@theme {
110+
--color-primary: hsl(...);
111+
--color-surface-100: hsl(...);
112+
--color-surface-200: hsl(...);
113+
--color-surface-300: hsl(...);
114+
--color-surface-content: hsl(...);
115+
}`}
116+
language="css"
117+
/>
118+
119+
<p>or by leveraging one of LayerStack's themes.</p>
120+
121+
<Code
122+
source={`/* Set up theme colors */
123+
@import '@layerstack/tailwind/core.css';
124+
125+
/* Then choose one of the following: */
126+
127+
/* 1. Basic light/dark theme */
128+
@import '@layerstack/tailwind/themes/basic.css';
129+
130+
/* 2. All Daisy UI themes ported to LayerStack */
131+
@import '@layerstack/tailwind/themes/daisy.css';
132+
133+
/* 3. All Skeleton themes ported to LayerStack */
134+
@import '@layerstack/tailwind/themes/skeleton.css';
135+
136+
/* 4. All Daisy UI and Skeleton themes ported to LayerStack (used by docs) */
137+
@import '@layerstack/tailwind/themes/all.css';
138+
`}
139+
language="css"
140+
/>
96141

97142
<h2>Usage</h2>
98143

0 commit comments

Comments
 (0)