| Crates.io | longcipher-leptos-components |
| lib.rs | longcipher-leptos-components |
| version | 0.1.0 |
| created_at | 2026-01-16 23:32:06.660476+00 |
| updated_at | 2026-01-16 23:32:06.660476+00 |
| description | Production-ready UI components for Leptos applications |
| homepage | |
| repository | https://github.com/longcipher/longcipher-leptos-components |
| max_upload_size | |
| id | 2049518 |
| size | 673,416 |
A production-ready UI component library for Leptos applications.
Add to your Cargo.toml:
[dependencies]
longcipher-leptos-components = { version = "0.1", features = ["editor"] }
use leptos::prelude::*;
use longcipher_leptos_components::editor::Editor;
#[component]
fn App() -> impl IntoView {
let (content, set_content) = signal(String::new());
view! {
<Editor
value=content
on_change=move |v| set_content.set(v)
language="rust"
show_line_numbers=true
placeholder="Start typing..."
/>
}
}
A full-featured text editor with:
syntax-highlighting)find-replace)folding)statistics)<Editor
value=content
on_change=move |v| set_content.set(v)
language="markdown"
show_line_numbers=true
word_wrap=true
tab_size=4
font_size=14.0
highlight_current_line=true
match_brackets=true
/>
| Feature | Description |
|---|---|
editor |
Core text editor (default) |
syntax-highlighting |
Code syntax coloring |
markdown |
Markdown parsing and preview |
find-replace |
Search and replace |
folding |
Code folding |
statistics |
Word/character counts |
line-numbers |
Line number gutter |
minimap |
VS Code-style navigation |
editor-full |
All editor features |
ssr |
Server-side rendering |
hydrate |
Hydration support |
csr |
Client-side only |
# Minimal editor
longcipher-leptos-components = { version = "0.1", features = ["editor"] }
# Full-featured editor
longcipher-leptos-components = { version = "0.1", features = ["editor-full"] }
# With SSR support
longcipher-leptos-components = { version = "0.1", features = ["editor", "ssr"] }
Components use CSS custom properties for easy theming:
.leptos-editor {
--editor-bg: #1e1e1e;
--editor-fg: #d4d4d4;
--editor-line-number-fg: #858585;
--editor-selection-bg: #264f78;
--editor-cursor: #aeafad;
--editor-border: #3c3c3c;
}
/* Light theme */
.leptos-editor.light {
--editor-bg: #ffffff;
--editor-fg: #1e293b;
--editor-border: #e2e8f0;
}
All components follow these standards:
#[prop(into)] - Flexible input typesclass prop - Custom styling supportimpl IntoView - Standard Leptos return typeContributions are welcome! Please read our contributing guidelines.
# Run tests
cargo test --all-features
# Check lints
cargo clippy --all-features
# Format code
cargo fmt
# Build docs
cargo doc --all-features --open
Licensed under MIT License.