You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 5, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: docs/content/docs/installation.md
+21-9Lines changed: 21 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,30 +5,42 @@ description: How to install dependencies.
5
5
6
6
<Prose>
7
7
8
+
## Install JinjaX
8
9
9
-
## Configure components in your project
10
+
```bash
11
+
uv add jinjax
12
+
```
13
+
14
+
JinjaX is the only required python dependency to use basic-components. However, the `basic-components` includes several
15
+
[helper functions](/docs/utilities) to set up the JinjaX template environment and merge tailwind classes within components.
16
+
17
+
## Install basic-components
10
18
11
-
You can install `basic-components` utilities into your project using your package manager.
12
-
Basic components includes several [helper functions](/docs/utilities) to setup the
13
-
JinjaX template environment and merge tailwind classes within components.
19
+
You can install `basic-components` utilities into your project using your package manager.
14
20
15
21
Installing the basic-components package is **optional**.
16
22
17
23
```bash
18
-
uv add basic-components
24
+
uv add basic-components[utils]
19
25
```
26
+
This will only add the python functions in the [utils](https://github.com/basicmachines-co/basic-components/tree/main/basic_components)
27
+
directory of the project. Components should be added via the [cli](/docs/cli).
20
28
21
-
**Note**: Using `uv` is optional. You can also use install via `pip` or `poetry`. [UV](https://docs.astral.sh/uv/) is
29
+
30
+
**Note**:
31
+
32
+
Using `uv` is also optional. You can also use install via `pip` or `poetry`. [UV](https://docs.astral.sh/uv/) is
22
33
used in these examples because it enables componets to be vendored directly into your project via the [components](/docs/cli) cli.
23
34
24
-
You can also add the code for the [helper functions](/docs/utilities) directly to your codebase if you want to add an
35
+
You can also add the code for the [helper functions](/docs/utilities) directly to your codebase if you don't want to add an
25
36
extra dependency.
26
37
27
-
Be sure to:
38
+
**Be sure to**:
39
+
28
40
- add the `cn` global function so it is available to all Jinja templates
29
41
- configure the `jinjax.Catalog` to load components from the directories under your `components` dir.
30
42
31
-
Configure your Jinja environment to load the components according to the [JinjaX docs](https://jinjax.scaletti.dev/guide/). You can also refer to the examples for [FastAPI](/docs/fastapi), [Django](/docs/django), or [Flask](/docs/flask).
43
+
You can also refer to the examples for [FastAPI](/docs/fastapi), [Django](/docs/django), or [Flask](/docs/flask).
0 commit comments