+
+This is an internal utility, not intended for public usage.
+
+[Rust Radix](https://github.com/RustForWeb/radix) is a Rust port of [Radix](https://www.radix-ui.com/primitives).
+
+## Documentation
+
+See [the Rust Radix book](https://radix.rustforweb.org/) for documentation.
+
+## Rust For Web
+
+The Rust Radix project is part of the [Rust For Web](https://github.com/RustForWeb).
+
+[Rust For Web](https://github.com/RustForWeb) creates and ports web UI libraries for Rust. All projects are free and open source.
diff --git a/packages/primitives/leptos/context/src/create_context.rs b/packages/primitives/leptos/context/src/create_context.rs
new file mode 100644
index 00000000..92d05f46
--- /dev/null
+++ b/packages/primitives/leptos/context/src/create_context.rs
@@ -0,0 +1,84 @@
+/// Macro to create a context provider and a hook to consume the context.
+///
+/// # Example
+/// ```rust
+/// use leptos::prelude::*;
+/// use radix_leptos_context::create_context;
+///
+/// #[derive(Clone)]
+/// struct CountContext(i32);
+///
+/// create_context!(
+/// context_type: CountContext,
+/// provider: CountProvider,
+/// hook: use_count,
+/// root: "Count"
+/// );
+///
+/// #[component]
+/// fn Counter() -> impl IntoView {
+/// let count = use_count("Counter");
+/// view! {
"Count: "{count.0}
}
+/// }
+///
+/// #[component]
+/// fn App() -> impl IntoView {
+/// view! {
+///
+///
+///
+/// }
+/// }
+/// ```
+///
+/// # Panics
+///
+/// The hook will panic if used in a component that is not wrapped in its provider:
+/// ```should_panic
+/// use leptos::prelude::*;
+/// use radix_leptos_context::create_context;
+///
+/// #[derive(Clone)]
+/// struct CountContext(i32);
+///
+/// create_context!(
+/// context_type: CountContext,
+/// provider: CountProvider,
+/// hook: use_count,
+/// root: "Count"
+/// );
+///
+/// #[component]
+/// fn BadApp() -> impl IntoView {
+/// let count = use_count("BadApp"); // Panics: "`BadApp` must be used within `Count`"
+/// view! {