{"id":20796752,"url":"https://github.com/synphonyte/leptos-use","last_synced_at":"2025-05-14T10:13:27.954Z","repository":{"id":164542622,"uuid":"640018024","full_name":"Synphonyte/leptos-use","owner":"Synphonyte","description":"Collection of essential Leptos utilities inspired by React-Use / VueUse","archived":false,"fork":false,"pushed_at":"2025-04-16T23:22:58.000Z","size":1718,"stargazers_count":394,"open_issues_count":29,"forks_count":90,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-01T19:39:07.782Z","etag":null,"topics":["dom","hooks","leptos","leptos-use","react-hooks","react-use","reactive","rust","solidjs-use","utility-library","vueuse","webassembly","yew-hooks"],"latest_commit_sha":null,"homepage":"https://leptos-use.rs/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Synphonyte.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["Synphonyte"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-05-12T19:19:46.000Z","updated_at":"2025-05-01T06:01:17.000Z","dependencies_parsed_at":"2023-10-03T00:55:37.116Z","dependency_job_id":"0ccdb9da-7f4b-4ac7-96e0-d93c75c31f5e","html_url":"https://github.com/Synphonyte/leptos-use","commit_stats":null,"previous_names":[],"tags_count":84,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Synphonyte%2Fleptos-use","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Synphonyte%2Fleptos-use/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Synphonyte%2Fleptos-use/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Synphonyte%2Fleptos-use/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Synphonyte","download_url":"https://codeload.github.com/Synphonyte/leptos-use/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254120179,"owners_count":22017953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dom","hooks","leptos","leptos-use","react-hooks","react-use","reactive","rust","solidjs-use","utility-library","vueuse","webassembly","yew-hooks"],"created_at":"2024-11-17T16:28:55.922Z","updated_at":"2025-05-14T10:13:27.882Z","avatar_url":"https://github.com/Synphonyte.png","language":"Rust","readme":"\u003cbr/\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/synphonyte/leptos-use\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/synphonyte/leptos-use/main/docs/logo.svg\" alt=\"Leptos-Use – Collection of essential Leptos utilities\" width=\"150\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch4 align=\"center\"\u003eCollection of essential Leptos utilities\u003c/h4\u003e\n\u003cp align=\"center\"\u003eInspired by React-Use / VueUse\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://crates.io/crates/leptos-use\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/leptos-use.svg?label=\u0026color=%232C1275\" alt=\"Crates.io\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://leptos-use.rs/server_side_rendering.html\"\u003e\u003cimg src=\"https://img.shields.io/badge/-SSR-%236a214b\" alt=\"SSR\"\u003e\u003c/a\u003e \n    \u003ca href=\"https://leptos-use.rs\"\u003e\u003cimg src=\"https://img.shields.io/badge/-docs%20%26%20demos-%239A233F\" alt=\"Docs \u0026 Demos\"\u003e\u003c/a\u003e \n    \u003ca href=\"https://leptos-use.rs\"\u003e\u003cimg src=\"https://img.shields.io/badge/-88%20functions-%23EF3939\" alt=\"88 Functions\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## Usage\n\n![Crates.io Total Downloads](https://img.shields.io/crates/d/leptos-use)\n[![Docs](https://docs.rs/leptos-use/badge.svg)](https://docs.rs/leptos-use/)\n[![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/synphonyte/leptos-use#license)\n[![Build Status](https://github.com/synphonyte/leptos-use/actions/workflows/cd.yml/badge.svg)](https://github.com/synphonyte/leptos-use/actions/workflows/cd.yml)\n[![Discord](https://img.shields.io/discord/1031524867910148188?color=%237289DA\u0026label=discord)](https://discord.com/channels/1031524867910148188/1121154537709895783)\n\n```rust\nuse leptos::prelude::*;\nuse leptos_use::{use_mouse, UseMouseReturn};\n\n#[component]\nfn Demo() -\u003e impl IntoView {\n    let UseMouseReturn { x, y, .. } = use_mouse();\n\n    view! { cx,\n        {x} \" x \" {y}\n    }\n}\n```\n\nMissing a function? Open a ticket or PR!\n\n## Development\n\nTo run all tests run\n\n```shell\n# Run tests (general)\ncargo test --features math,docs,ssr\n\n# Run tests (axum) use_cookie\ncargo test --features math,docs,ssr,axum --doc use_cookie\n\n# Run tests (axum) use_locale\ncargo test --features math,docs,ssr,axum --doc use_locale\n\n# Run tests (actix) use_cookie\ncargo test --features math,docs,ssr,actix --doc use_cookie\n\n# Run tests (actix) use_locale\ncargo test --features math,docs,ssr,actix --doc use_locale\n```\n\n### Book\n\nFirst you need to install\n\n```shell\ncargo install mdbook mdbook-cmdrun trunk\n```\n\nTo build the book go in your terminal into the docs/book folder\nand run\n\n```shell\nmdbook serve\n```\n\nThis builds the html version of the book and runs a local dev server.\nTo also add in the examples open another shell and run\n\n```shell\npython3 post_build.py\n```\n\nIf you only want to add the example for one function you can run for example\n\n```shell\npython3 post_build.py use_storage\n```\n\n### New Function Template\n\nTo scaffold a new function quickly you can run `template/createfn.sh`. It requires\nthat [`ffizer`](https://ffizer.github.io/) and Python 3 is installed.\nThis will create the function file in the src directory, scaffold an example directory and an entry in the book.\n\n## Leptos compatibility\n\n| Crate version | Compatible Leptos version |\n|---------------|---------------------------|\n| \u003c= 0.3        | 0.3                       |\n| 0.4, 0.5, 0.6 | 0.4                       |\n| 0.7, 0.8, 0.9 | 0.5                       |\n| 0.10 – 0.13   | 0.6                       |\n| 0.14, 0.15    | 0.7                       |\n| 0.16          | 0.8                       |\n","funding_links":["https://github.com/sponsors/Synphonyte"],"categories":["Libraries"],"sub_categories":["Web programming"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynphonyte%2Fleptos-use","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynphonyte%2Fleptos-use","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynphonyte%2Fleptos-use/lists"}