Reusable Leptos UI components shared by platform-staff-ui and platform-customer-ui (formerly primitives-staff-components per D-10D.1)
| Tier | platform |
| Role | unclassified (baselined) |
| Path | crates/platform/leptos-components |
| Edition | 2021 |
| Targets | platform_leptos_components |
| Public items | 159 across 25 modules |
| Tests | 69 |
What it is for
Reusable Leptos UI components for staff platform.
This crate provides a component library that can be used across different staff modules.
Sprint 10A (D-10A.1) merged in best-in-class patterns from rust-starters/leptos-staff-ui (rich_text_editor, file_upload, image_cropper), rust-inventory-ai/frontend (selection ctx, bulk_actions, view_toggle, context_menu), and rfpdb/crates/rfps-portal-shared (completion_banner). All consumer-domain coupling stripped at the source; these are now generic library crates.
Capabilities
account_hub (other)
AccountHub — the shared "My Account" screen (Sprint 0.99 Phase 1).
| Item |
|---|
pub const THEME_STORAGE_KEY: & str |
fn apply_theme(theme : & str) |
fn AccountHub(labels : AccountLabels, port : AccountPort) -> impl IntoView |
AccountLabels
AccountHub — the shared "My Account" screen (Sprint 0.99 Phase 1).
| Item |
|---|
pub struct AccountLabels |
AccountPort
AccountHub — the shared "My Account" screen (Sprint 0.99 Phase 1).
| Item |
|---|
pub struct AccountPort |
AccountPreferences
AccountHub — the shared "My Account" screen (Sprint 0.99 Phase 1).
| Item |
|---|
pub struct AccountPreferences |
AccountProfile
AccountHub — the shared "My Account" screen (Sprint 0.99 Phase 1).
| Item |
|---|
pub struct AccountProfile |
ChangePassword
AccountHub — the shared "My Account" screen (Sprint 0.99 Phase 1).
| Item |
|---|
pub struct ChangePassword |
LocaleOption
AccountHub — the shared "My Account" screen (Sprint 0.99 Phase 1).
| Item |
|---|
pub struct LocaleOption |
PortFuture
AccountHub — the shared "My Account" screen (Sprint 0.99 Phase 1).
| Item |
|---|
pub type PortFuture<T>: Pin <Box <dyn Future <Output = Result <T, String>>>> |
UpdateEmail
AccountHub — the shared "My Account" screen (Sprint 0.99 Phase 1).
| Item |
|---|
pub struct UpdateEmail |
UpdatePreferences
AccountHub — the shared "My Account" screen (Sprint 0.99 Phase 1).
| Item |
|---|
pub struct UpdatePreferences |
UpdateProfile
AccountHub — the shared "My Account" screen (Sprint 0.99 Phase 1).
| Item |
|---|
pub struct UpdateProfile |
admin_shell (other)
Sidebar admin shell — generic chrome for staff/admin Leptos surfaces.
| Item |
|---|
fn route_matches_default(current : & str, href : & str, exact : bool) -> bool |
fn NavGroup(# prop(into) label : String, children : Children) -> impl IntoView |
fn TopBarHeader(children : ChildrenFn) -> impl IntoView |
fn MobileMenuToggle() -> impl IntoView |
fn SidebarShell(# prop(optional) brand : Option <ChildrenFn>, nav : ChildrenFn, # prop(optional) footer : Option <ChildrenFn>, children : Children,) -> impl IntoView |
ActiveMatcher
Sidebar admin shell — generic chrome for staff/admin Leptos surfaces.
| Item |
|---|
pub type ActiveMatcher: Rc <dyn Fn(& str, & str) -> bool> |
fn NavLink(# prop(into) href : String, # prop(optional) exact : bool, # prop(optional) predicate : Option <ActiveMatcher>, # prop(default = None) badge : Option <Signal <Option <i64>>>, # prop(default = None) icon_path : Option <String>, # doc = " Optional view-slot icon(Sprint 0.D #30 — closes the Sprint 0.9" # doc = " Gate 1.5 R2 Q2 deferred-View-slot debt). Use for multi-path SVGs," # doc = " icon-component libraries, or any markup beyond a single d-path" # doc = " attribute. Takes precedence over icon_path when both are set." # prop(default = None) icon : Option <Callback <(), View>>, children : Children,) -> impl IntoView |
NavLinkSpec
Sidebar admin shell — generic chrome for staff/admin Leptos surfaces.
| Item |
|---|
pub struct NavLinkSpec |
NavLinkSpec :: fn new(label : impl Into <String>, path : impl Into <String>) -> Self |
NavLinkSpec :: fn with_icon(mut self, icon_path : impl Into <String>) -> Self |
NavLinkSpec :: fn with_badge(mut self, badge : i64) -> Self |
NavLinkSpec :: fn with_children(mut self, children : Vec <NavLinkSpec>) -> Self |
NavLinkSpec :: fn exact(mut self) -> Self |
fn render_nav_link_spec(spec : NavLinkSpec) -> impl IntoView |
SidebarCtx
Sidebar admin shell — generic chrome for staff/admin Leptos surfaces.
| Item |
|---|
pub struct SidebarCtx |
UserInfo
Sidebar admin shell — generic chrome for staff/admin Leptos surfaces.
| Item |
|---|
pub struct UserInfo |
UserInfo :: fn new(name : impl Into <String>, email : impl Into <String>) -> Self |
UserInfo :: fn with_avatar(mut self, url : impl Into <String>) -> Self |
fn UserMenu(user : UserInfo, # prop(into, default = "/logout" . to_string()) signout_href : String,) -> impl IntoView |
fn UserMenuDropdown(# prop(into) user : MaybeSignal <UserInfo>, # doc = " Target for the signout link rendered as <A href=...>. **Ignored" # doc = " when on_signout is Some —** in that case the entry becomes a" # doc = " <button> and the href is unused." # prop(into, default = "/logout" . to_string()) signout_href : String, # doc = " Optional callback invoked when the \"Sign out\" entry is clicked." # doc = " If provided, renders the entry as a <button> and overrides the" # doc = " signout_href link navigation — useful for async logout flows." # doc = " Added in Sprint 0.9.R. Backward-compat: None(default)" # doc = " preserves the Sprint 0.9.5 <A href> behavior." # prop(default = None) on_signout : Option <Callback <()>>, # doc = " Extra (label, href) links rendered between the user info header and" # doc = " \"Sign out\" -- e.g. Settings/Users/Roles/Access/API Keys/Logs, for a" # doc = " consumer that keeps administrative/setup pages out of the main" # doc = " sidebar(operator, sprint 3.69: \"the control panel on the left is" # doc = " super crammed, anything administrative or setup should be hidden" # doc = " with the dropdown on my account settings\"). Empty by default --" # doc = " existing consumers render exactly as before." # prop(default = Vec::new()) menu_items : Vec <(String, String)>,) -> impl IntoView |
BadgeVariant
Badge component.
| Item |
|---|
pub enum BadgeVariant |
fn Badge(# doc = " Badge variant" # prop(default = BadgeVariant::Default) variant : BadgeVariant, # doc = " Whether to render as a pill shape" # prop(default = false) pill : bool, # doc = " Additional CSS classes" # prop(default = "") class : & 'static str, # doc = " Badge content" children : Children,) -> impl IntoView |
fn DotBadge(# doc = " Badge variant" # prop(default = BadgeVariant::Default) variant : BadgeVariant, # doc = " Whether to show pulsing animation" # prop(default = false) pulse : bool, # doc = " Badge label" children : Children,) -> impl IntoView |
bulk_actions (other)
<BulkActionBar> — floating bottom-center action bar for bulk
| Item |
|---|
fn BulkActionBar(# doc = " Label for the selection count, e.g. \"item(s)\" or \"page(s)\" —" # doc = " the framework computes \"{N} {item_label} selected\"." # prop(into, default = "item(s)" . to_string()) item_label : String, # doc = " Consumer-supplied action affordances. Receives the current" # doc = " selection set so it can read the IDs for its mutation calls." # doc = " Typical contents: a <Button> per action, or a custom row" # doc = " of pickers + a \"Go\" button." children : ChildrenFn,) -> impl IntoView |
fn make_selection_ctx(selected : ReadSignal <HashSet <Uuid>>, set_selected : WriteSignal <HashSet <Uuid>>,) -> SelectionCtx |
ButtonVariant
Button component.
| Item |
|---|
pub enum ButtonVariant |
fn Button(# doc = " Button variant" # prop(default = ButtonVariant::Primary) variant : ButtonVariant, # doc = " Click handler" # prop(optional) on_click : Option <Callback <ev::MouseEvent>>, # doc = " Disabled state(can be a plain bool or a reactive signal)" # prop(into, default = false . into()) disabled : MaybeSignal <bool>, # doc = " Loading state(shows spinner, can be a plain bool or a reactive signal)" # prop(into, default = false . into()) loading : MaybeSignal <bool>, # doc = " Button type(button, submit, reset)" # prop(default = "button") button_type : & 'static str, # doc = " Additional CSS classes" # prop(default = "") class : & 'static str, # doc = " Optional DOM id(e.g. a stable test/automation hook). Rendered only" # doc = " when non-empty." # prop(default = "") id : & 'static str, # doc = " Button content" children : Children,) -> impl IntoView |
fn IconButton(# doc = " Button variant" # prop(default = ButtonVariant::Ghost) variant : ButtonVariant, # doc = " Click handler" # prop(optional) on_click : Option <Callback <ev::MouseEvent>>, # doc = " Disabled state" # prop(default = false) disabled : bool, # doc = " Aria label for accessibility" label : & 'static str, # doc = " Icon content" children : Children,) -> impl IntoView |
CompletionItem
<CompletionBanner> — multi-step form / profile completion strip.
| Item |
|---|
pub struct CompletionItem |
CompletionItem :: fn new(label : impl Into <String>, completed : bool) -> Self |
fn CompletionBanner(# doc = " The full set of items the user is being asked to complete." items : Signal <Vec <CompletionItem>>, # doc = " Headline label(e.g. \"Complete your profile\")." # prop(into, default = "Complete your profile" . to_string()) title : String, # doc = " Optional href for the \"Continue setup →\" link." # prop(optional, into) continue_href : String, # doc = " Optional label for the continue link." # prop(into, default = "Continue setup →" . to_string()) continue_label : String,) -> impl IntoView |
ContextMenuItem
<ContextMenu> — generic right-click / three-dot dropdown menu.
| Item |
|---|
pub enum ContextMenuItem |
ContextMenuItem :: fn action(label : impl Into <String>, on_click : Callback <()>) -> Self |
ContextMenuItem :: fn destructive(mut self) -> Self |
ContextMenuItem :: fn with_icon(mut self, path : impl Into <String>) -> Self |
ContextMenuItem :: fn with_dot_color(mut self, color : DotColor) -> Self |
ContextMenuItem :: fn separator() -> Self |
ContextMenuItem :: fn header(label : impl Into <String>) -> Self |
ContextMenuItem :: fn scrollable_group(items : Vec <ContextMenuItem>, max_height : impl Into <String>) -> Self |
fn ContextMenu(# doc = " Identifies the row this menu belongs to. Used by OpenMenuCtx" # doc = " for single-open enforcement." item_id : Uuid, # doc = " Menu contents." items : Vec <ContextMenuItem>, # doc = " CSS classes for trigger positioning." # prop(optional, into) trigger_class : String,) -> impl IntoView |
DotColor
<ContextMenu> — generic right-click / three-dot dropdown menu.
| Item |
|---|
pub enum DotColor |
DotColor :: fn bg_class(self) -> & 'static str |
data_table (other)
Data table component.
| Item |
|---|
fn DataTable <T>(# doc = " Data items" items : Vec <T>, # doc = " Column definitions" columns : Vec <ColumnDef <T>>, # doc = " Whether data is loading" # prop(default = false) loading : bool, # doc = " Empty state message" # prop(default = "No items found") empty_message : & 'static str, # doc = " Row click handler" # prop(optional) on_row_click : Option <Callback <usize>>, # doc = " Key extractor for stable row identity" # prop(optional) key_fn : Option <KeyFn <T>>,) -> impl IntoView where T : Clone + 'static, |
Column
Data table component.
| Item |
|---|
pub trait Column<T> |
ColumnDef
Data table component.
| Item |
|---|
pub struct ColumnDef<T> |
ColumnDef<T>
Data table component.
| Item |
|---|
ColumnDef<T> :: fn new(key : impl Into <String>, header : impl Into <String>, render : impl Fn(& T) -> View + 'static,) -> Self |
ColumnDef<T> :: fn sortable(mut self) -> Self |
ColumnDef<T> :: fn width(mut self, width : impl Into <String>) -> Self |
ColumnDef<T> :: fn key(& self) -> & str |
ColumnDef<T> :: fn header(& self) -> & str |
ColumnDef<T> :: fn render(& self, item : & T) -> View |
ColumnDef<T> :: fn sortable(& self) -> bool |
ColumnDef<T> :: fn width(& self) -> Option <& str> |
KeyFn
Data table component.
| Item |
|---|
pub type KeyFn<T>: Rc <dyn Fn(& T) -> String> |
empty (other)
Empty state component.
| Item |
|---|
fn EmptyState(# doc = " Title" title : & 'static str, # doc = " Description" # prop(optional) description : Option <& 'static str>, # doc = " Icon(SVG path)" # prop(optional) icon : Option <& 'static str>, # doc = " Action button" # prop(optional) children : Option <Children>,) -> impl IntoView |
fn ErrorState(# doc = " Error title" # prop(default = "Something went wrong") title : & 'static str, # doc = " Error message" message : String, # doc = " Retry handler" # prop(optional) on_retry : Option <Callback <()>>,) -> impl IntoView |
UploadProgress
<FileUpload> — multipart-aware file picker with per-file progress.
| Item |
|---|
pub struct UploadProgress |
fn FileUpload(# doc = " Endpoint URL for POST /api/v1/admin/media." # prop(into) upload_url : String, # doc = " CSRF cookie name(consumer's ApiClient knows this)." # prop(into) csrf_cookie_name : String, # doc = " MIME types passed to the <input accept> attribute." # prop(into, default = "image/*" . to_string()) accept : String, # doc = " Fires when one file's progress changes(loaded/total/percent)." # prop(into) on_progress : Callback <UploadProgress>, # doc = " Fires on a per-file 2xx with the parsed UploadResponse." # prop(into) on_complete : Callback <UploadResponse>, # doc = " Fires on a per-file 4xx/5xx with (filename, error_code, detail)." # prop(into) on_error : Callback <(String, String, String)>, # doc = " Allow multi-file picks(defaults to single)." # prop(default = false) multiple : bool,) -> impl IntoView |
form (other)
Form components.
| Item |
|---|
fn FormGroup(# doc = " Label text" # prop(into) label : String, # doc = " Field name/id" name : & 'static str, # doc = " Whether the field is required" # prop(default = false) required : bool, # doc = " Error message" # prop(optional) error : Option <String>, # doc = " Hint text" # prop(optional, into) hint : Option <String>, # doc = " Form control" children : Children,) -> impl IntoView |
fn TextInput(# doc = " Input name/id" name : & 'static str, # doc = " Input type(text, email, password, etc.)" # prop(default = "text") input_type : & 'static str, # doc = " Placeholder text" # prop(optional) placeholder : Option <& 'static str>, # doc = " Current value(controlled)" # prop(optional) value : Option <RwSignal <String>>, # doc = " Change handler(uncontrolled)" # prop(optional) on_input : Option <Callback <String>>, # doc = " Whether the field is disabled" # prop(default = false) disabled : bool, # doc = " Whether the field is readonly" # prop(default = false) readonly : bool, # doc = " Whether there's an error" # prop(default = false) has_error : bool, # doc = " Additional classes" # prop(default = "") class : & 'static str,) -> impl IntoView |
fn TextArea(# doc = " Input name/id" name : & 'static str, # doc = " Placeholder text" # prop(optional) placeholder : Option <& 'static str>, # doc = " Number of rows" # prop(default = 4) rows : u32, # doc = " Current value(controlled)" # prop(optional) value : Option <RwSignal <String>>, # doc = " Change handler(uncontrolled)" # prop(optional) on_input : Option <Callback <String>>, # doc = " Whether the field is disabled" # prop(default = false) disabled : bool, # doc = " Whether there's an error" # prop(default = false) has_error : bool, # doc = " Additional classes" # prop(default = "") class : & 'static str,) -> impl IntoView |
fn Checkbox(# doc = " Input name/id" name : & 'static str, # doc = " Label text" label : & 'static str, # doc = " Checked state(controlled)" # prop(optional) checked : Option <RwSignal <bool>>, # doc = " Change handler" # prop(optional) on_change : Option <Callback <bool>>, # doc = " Whether the field is disabled" # prop(default = false) disabled : bool,) -> impl IntoView |
SelectOption
Form components.
| Item |
|---|
pub struct SelectOption |
SelectOption :: fn new(value : impl Into <String>, label : impl Into <String>) -> Self |
fn Select(# doc = " Input name/id" name : & 'static str, # doc = " Options" options : Vec <SelectOption>, # doc = " Current value(controlled)" # prop(optional) value : Option <RwSignal <String>>, # doc = " Change handler" # prop(optional) on_change : Option <Callback <String>>, # doc = " Whether the field is disabled" # prop(default = false) disabled : bool, # doc = " Placeholder option text" # prop(optional) placeholder : Option <& 'static str>, # doc = " Whether there's an error" # prop(default = false) has_error : bool,) -> impl IntoView |
hierarchy_tree (other)
Hierarchy tree library crate — HierarchyNode<T> + build_hierarchy_tree +
| Item |
|---|
pub const MAX_HIERARCHY_DEPTH: usize |
HierarchyNode
Hierarchy tree library crate — HierarchyNode<T> + build_hierarchy_tree +
| Item |
|---|
pub struct HierarchyNode<T : Clone + 'static> |
fn build_hierarchy_tree <T, IdFn, LabelFn, ParentFn, CountFn>(flat : & T, id_fn : IdFn, label_fn : LabelFn, parent_fn : ParentFn, count_fn : CountFn,) -> Vec <HierarchyNode <T>> where T : Clone + 'static, IdFn : Fn(& T) -> String, LabelFn : Fn(& T) -> String, ParentFn : Fn(& T) -> Option <String>, CountFn : Fn(& T) -> Option <i64>, |
| `fn HierarchyTree <T>(nodes : Vec <HierarchyNode <T>>, # doc = " Signal pointing at the currently-active node id(for highlight)." # prop(into, default = Signal::derive(\ |
HierarchyNode<T>
Hierarchy tree library crate — HierarchyNode<T> + build_hierarchy_tree +
| Item |
|---|
HierarchyNode<T> :: fn new(id : impl Into <String>, label : impl Into <String>, payload : T) -> Self |
HierarchyNode<T> :: fn with_count(mut self, count : i64) -> Self |
HierarchyNode<T> :: fn with_children(mut self, children : Vec <HierarchyNode <T>>) -> Self |
image_cropper (other)
<ImageCropper> — focal-point picker overlay.
| Item |
|---|
fn ImageCropper(# doc = " Absolute or root-relative URL to the image(typically the" # doc = " large-WebP variant of the asset)." # prop(into) src : String, # doc = " Initial focal point coordinates in [0, 1. Falls back to(0.5,"] # doc = " 0.5) when either is None." # prop(into, default = None) initial_focal_x : Option <f64>, # prop(into, default = None) initial_focal_y : Option <f64>, # doc = " Fires on every drag step with the new normalized coords." # prop(into) on_change : Callback <(f64, f64)>,) -> impl IntoView |
loading (other)
Loading components.
| Item |
|---|
fn Spinner(# doc = " Size(sm, md, lg)" # prop(default = "md") size : & 'static str, # doc = " Color class" # prop(default = "text-blue-600") color : & 'static str,) -> impl IntoView |
fn LoadingOverlay(# doc = " Whether loading is active" loading : ReadSignal <bool>, # doc = " Loading text" # prop(default = "Loading...") text : & 'static str, # doc = " Content to overlay" children : Children,) -> impl IntoView |
fn PageLoading(# prop(default = "Loading...") text : & 'static str) -> impl IntoView |
fn Skeleton(# doc = " Width class" # prop(default = "w-full") width : & 'static str, # doc = " Height class" # prop(default = "h-4") height : & 'static str,) -> impl IntoView |
fn SkeletonCard() -> impl IntoView |
fn SkeletonTableRow(# prop(default = 4) columns : usize) -> impl IntoView |
media (other)
Media chrome library crates — <DropZone> + <MediaGrid> + MediaItem.
| Item |
|---|
fn format_file_size(bytes : i64) -> String |
fn is_image(content_type : & str) -> bool |
fn DropZone(# doc = " Fires when the user drops files OR picks files via the click input." # doc = " Both paths normalize to a FileList." # prop(into) on_files : Callback <FileList>, # doc = " Reactive uploading indicator — when true, the drop zone shows a" # doc = " spinner overlay instead of the upload prompt." # prop(into, default = MaybeSignal::Static(false)) uploading : MaybeSignal <bool>, # doc = " accept attribute passed to the file input. Defaults to images." # prop(into, default = "image/*" . to_string()) accept : String, # doc = " Help-text shown under the upload prompt." # prop(into, default = "PNG, JPG, PDF up to 10MB" . to_string()) hint : String,) -> impl IntoView |
MediaItem
Media chrome library crates — <DropZone> + <MediaGrid> + MediaItem.
| Item |
|---|
pub struct MediaItem |
MediaItem :: fn new(id : Uuid, filename : impl Into <String>, url : impl Into <String>) -> Self |
MediaItem :: fn with_content_type(mut self, ct : impl Into <String>) -> Self |
MediaItem :: fn with_size_bytes(mut self, n : i64) -> Self |
fn MediaGrid(# prop(into) items : Signal <Vec <MediaItem>>, # doc = " Optional delete action. When Some, hover overlay shows a delete" # doc = " button that calls this with the item id." # prop(default = None) on_delete : Option <Callback <Uuid>>, # doc = " Optional view action. When Some, hover overlay shows a view" # doc = " button that calls this with the item id. Consumer decides what" # doc = " view means(modal, new tab, route transition, etc.)." # prop(default = None) on_view : Option <Callback <Uuid>>,) -> impl IntoView |
MediaPickerItem
Media picker modal library crate (Sprint 0.33) — <MediaPicker>.
| Item |
|---|
pub struct MediaPickerItem |
MediaPickerItem :: fn new(id : impl Into <String>, thumbnail_url : impl Into <String>, filename : impl Into <String>,) -> Self |
fn MediaPicker(# doc = " Whether the picker is open." open : ReadSignal <bool>, # doc = " Assets to choose from(consumer fetches/filters these)." items : Signal <Vec <MediaPickerItem>>, # doc = " Called with the chosen asset id." on_select : Callback <String>, # doc = " Called when the picker is dismissed." on_close : Callback <()>, # doc = " Optional search callback — when Some, a search box is shown and fires" # doc = " this with the query on input." # prop(default = None) on_search : Option <Callback <String>>, # doc = " Optional load-more callback — when Some, a \"Load more\" button is shown." # prop(default = None) on_load_more : Option <Callback <()>>,) -> impl IntoView |
modal (other)
Modal dialog component.
| Item |
|---|
fn Modal(# doc = " Whether the modal is open" open : ReadSignal <bool>, # doc = " Close handler" on_close : Callback <()>, # doc = " Modal title. String, not &'static str: a translated title comes out" # doc = " of the i18n catalog at render time and cannot be a literal(staff-ui's" # doc = " no-unwrapped-literal gate would otherwise force every caller to ship an" # doc = " English title). #[prop(into) keeps title=\"Literal\" call sites"] # doc = " working unchanged." # prop(into) title : String, # doc = " Modal size" # prop(default = "md") size : & 'static str, # doc = " Whether clicking backdrop closes the modal" # prop(default = true) close_on_backdrop : bool, # doc = " Modal content" children : ChildrenFn,) -> impl IntoView |
fn ConfirmModal(# doc = " Whether the modal is open" open : ReadSignal <bool>, # doc = " Close handler" on_close : Callback <()>, # doc = " Confirm handler" on_confirm : Callback <()>, # doc = " Modal title — see [Modal's title for why this is a String."] # prop(into) title : String, # doc = " Confirmation message" message : String, # doc = " Confirm button text" # prop(default = "Confirm") confirm_text : & 'static str, # doc = " Cancel button text" # prop(default = "Cancel") cancel_text : & 'static str, # doc = " Whether the action is destructive" # prop(default = false) destructive : bool, # doc = " Optional DOM id for the confirm button(a stable test/automation" # doc = " hook). Rendered only when non-empty; needed when more than one" # doc = " ConfirmModal can be mounted at once(distinct ids per instance)." # prop(default = "") confirm_id : & 'static str,) -> impl IntoView |
pagination (other)
Pagination component.
| Item |
|---|
fn Pagination(# doc = " Current page(1-indexed)" current_page : ReadSignal <u32>, # doc = " Total number of pages" total_pages : ReadSignal <u32>, # doc = " Page change handler" on_page_change : Callback <u32>, # doc = " Number of page buttons to show" # prop(default = 5) visible_pages : usize,) -> impl IntoView |
fn PageSizeSelector(# doc = " Current page size" page_size : ReadSignal <u32>, # doc = " Page size change handler" on_change : Callback <u32>, # doc = " Available page sizes" # prop(default = vec ! [10, 25, 50, 100)] options : Vec <u32>,) -> impl IntoView |
fn PaginationInfo(# doc = " Current page(1-indexed)" current_page : ReadSignal <u32>, # doc = " Page size" page_size : ReadSignal <u32>, # doc = " Total items" total_items : ReadSignal <u32>,) -> impl IntoView |
GalleryPhoto
Photo gallery library crate — GalleryPhoto + <PhotoGallery>.
| Item |
|---|
pub struct GalleryPhoto |
GalleryPhoto :: fn new(id : Uuid, url : impl Into <String>) -> Self |
GalleryPhoto :: fn primary(mut self) -> Self |
fn sort_primary_first(photos : & mut GalleryPhoto) |
fn PhotoGallery(photos : Vec <GalleryPhoto>, # doc = " Optional \"Make Primary\" callback. When Some and the thumb is not" # doc = " already first, hover overlay shows a ⬆ button that calls this with" # doc = " the photo id." # prop(default = None) on_set_primary : Option <Callback <Uuid>>, # doc = " Optional \"Delete\" callback. When Some, hover overlay shows a ✕" # doc = " button that calls this with the photo id." # prop(default = None) on_delete : Option <Callback <Uuid>>, # doc = " When true, action buttons are always visible(touch / a11y" # doc = " consumers). Default false preserves the donor's" # doc = " hover-only behavior." # prop(default = false) actions_always_visible : bool, # doc = " Optional empty-state slot. When Some, called once when photos" # doc = " is empty and the return value replaces the default placeholder" # doc = " SVG." # prop(default = None) empty_view : Option <Callback <(), View>>,) -> impl IntoView |
PictureSource
Responsive <Picture> library crate (Sprint 0.29).
| Item |
|---|
pub struct PictureSource |
PictureSource :: fn new(webp_url : impl Into <String>, jpeg_url : impl Into <String>, alt : impl Into <String>,) -> Self |
PictureSource :: fn with_dimensions(mut self, width : u32, height : u32) -> Self |
fn Picture(# doc = " The WebP + JPEG source pair." source : PictureSource, # doc = " loading=\"lazy\"(default) vs \"eager\"(e.g. above-the-fold hero)." # prop(default = true) lazy : bool, # doc = " Extra classes applied to the <img>." # prop(into, optional) class : String,) -> impl IntoView |
rich_text_editor (other)
<RichTextEditor> — markdown source + live preview pane.
| Item |
|---|
fn RichTextEditor(# doc = " Initial markdown source." # prop(into) initial : String, # doc = " Fires on every keystroke with the current markdown source." # doc = " The host page reads this in its Save handler." # prop(into) on_change : Callback <String>, # doc = " Optional server-verified body_html(fetched + passed by the" # doc = " host page via a markdown-preview endpoint). When present," # doc = " replaces the local pulldown-cmark preview and shows the" # doc = " \"verified\" badge." # prop(into, default = create_rw_signal(None)) server_preview : RwSignal <Option <String>>,) -> impl IntoView |
selection (other)
Cross-component selection + actions context.
| Item |
|---|
fn SelectionCheckbox(item_id : Uuid, # prop(optional, into) class : String) -> impl IntoView |
fn has_selection_ctx() -> bool |
ActionKind
Cross-component selection + actions context.
| Item |
|---|
pub enum ActionKind |
ConfirmCtx
Cross-component selection + actions context.
| Item |
|---|
pub struct ConfirmCtx |
ItemActionsCtx
Cross-component selection + actions context.
| Item |
|---|
pub struct ItemActionsCtx |
OpenMenuCtx
Cross-component selection + actions context.
| Item |
|---|
pub struct OpenMenuCtx |
PendingAction
Cross-component selection + actions context.
| Item |
|---|
pub struct PendingAction |
SelectionCtx
Cross-component selection + actions context.
| Item |
|---|
pub struct SelectionCtx |
toast (other)
Toast notification system.
| Item |
|---|
fn ToastProvider(children : Children) -> impl IntoView |
ToastContext
Toast notification system.
| Item |
|---|
pub struct ToastContext |
ToastContext :: fn new() -> Self |
ToastContext :: fn show(& self, toast : ToastMessage) |
ToastContext :: fn success(& self, title : impl Into <String>) |
ToastContext :: fn error(& self, title : impl Into <String>) |
ToastContext :: fn warning(& self, title : impl Into <String>) |
ToastContext :: fn info(& self, title : impl Into <String>) |
ToastContext :: fn dismiss(& self, id : & str) |
ToastContext :: fn default() -> Self |
fn use_toasts() -> ToastContext |
ToastMessage
Toast notification system.
| Item |
|---|
pub struct ToastMessage |
ToastMessage :: fn new(toast_type : ToastType, title : impl Into <String>) -> Self |
ToastMessage :: fn with_message(mut self, message : impl Into <String>) -> Self |
ToastMessage :: fn with_duration(mut self, duration_ms : u64) -> Self |
ToastMessage :: fn success(title : impl Into <String>) -> Self |
ToastMessage :: fn error(title : impl Into <String>) -> Self |
ToastMessage :: fn warning(title : impl Into <String>) -> Self |
ToastMessage :: fn info(title : impl Into <String>) -> Self |
fn Toast(toast : ToastMessage, on_dismiss : Callback <String>) -> impl IntoView |
fn ToastContainer(toasts : RwSignal <VecDeque <ToastMessage>>) -> impl IntoView |
ToastType
Toast notification system.
| Item |
|---|
pub enum ToastType |
typeahead_selector (other)
Typeahead hierarchy selector — TypeaheadEntry + build_breadcrumb_entries
| Item |
|---|
pub const MAX_BREADCRUMB_DEPTH: usize |
pub const MAX_TYPEAHEAD_RESULTS: usize |
TypeaheadEntry
Typeahead hierarchy selector — TypeaheadEntry + build_breadcrumb_entries
| Item |
|---|
pub struct TypeaheadEntry |
TypeaheadEntry :: fn new(id : Uuid, label : impl Into <String>, breadcrumb : impl Into <String>) -> Self |
TypeaheadEntry :: fn with_badge(mut self, badge : impl Into <String>) -> Self |
fn build_breadcrumb_entries <T, IdFn, LabelFn, ParentFn, BadgeFn>(flat : & T, id_fn : IdFn, label_fn : LabelFn, parent_fn : ParentFn, badge_fn : BadgeFn,) -> Vec <TypeaheadEntry> where IdFn : Fn(& T) -> Uuid, LabelFn : Fn(& T) -> String, ParentFn : Fn(& T) -> Option <Uuid>, BadgeFn : Fn(& T) -> Option <String>, |
fn filter_and_rank(entries : & TypeaheadEntry, query : & str) -> Vec <TypeaheadEntry> |
fn TypeaheadHierarchySelector(# doc = " Reactive list of available entries(consumer fetches + builds)." # prop(into) entries : Signal <Vec <TypeaheadEntry>>, # doc = " Currently selected entry id(None = no selection)." # prop(into) selected : Signal <Option <Uuid>>, # doc = " Fires when the user selects an entry(Some(id)) or clears the" # doc = " chip(None). Consumer mirrors to its own state via this." on_select : Callback <Option <Uuid>>, # doc = " Placeholder shown in the search input when no entry is selected." # prop(into, default = "Search…" . to_string()) placeholder : String,) -> impl IntoView |
view_toggle (other)
<ViewToggle> — three-mode list/grid/card switcher with
| Item |
|---|
fn load_view_mode(key : & str) -> ViewMode |
fn save_view_mode(key : & str, mode : ViewMode) |
fn ViewToggle(mode : ReadSignal <ViewMode>, set_mode : WriteSignal <ViewMode>, # prop(into) storage_key : String,) -> impl IntoView |
How to use it
No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.
Module structure
platform_leptos_components
account_hubadmin_shellbadgebulk_actionsbuttoncompletion_bannercontext_menudata_tableemptyfile_uploadformhierarchy_treeimage_cropperloadingmediamedia_pickermodalpaginationphoto_gallerypicturerich_text_editorselectiontoasttypeahead_selectorview_toggle
flowchart TD n_platform_leptos_components["platform_leptos_components"] n_platform_leptos_components --> n_account_hub["account_hub"] n_platform_leptos_components --> n_admin_shell["admin_shell"] n_platform_leptos_components --> n_badge["badge"] n_platform_leptos_components --> n_bulk_actions["bulk_actions"] n_platform_leptos_components --> n_button["button"] n_platform_leptos_components --> n_completion_banner["completion_banner"] n_platform_leptos_components --> n_context_menu["context_menu"] n_platform_leptos_components --> n_data_table["data_table"] n_platform_leptos_components --> n_empty["empty"] n_platform_leptos_components --> n_file_upload["file_upload"] n_platform_leptos_components --> n_form["form"] n_platform_leptos_components --> n_hierarchy_tree["hierarchy_tree"] n_platform_leptos_components --> n_image_cropper["image_cropper"] n_platform_leptos_components --> n_loading["loading"] n_platform_leptos_components --> n_media["media"] n_platform_leptos_components --> n_media_picker["media_picker"] n_platform_leptos_components --> n_modal["modal"] n_platform_leptos_components --> n_pagination["pagination"] n_platform_leptos_components --> n_photo_gallery["photo_gallery"] n_platform_leptos_components --> n_picture["picture"] n_platform_leptos_components --> n_rich_text_editor["rich_text_editor"] n_platform_leptos_components --> n_selection["selection"] n_platform_leptos_components --> n_toast["toast"] n_platform_leptos_components --> n_typeahead_selector["typeahead_selector"] n_platform_leptos_components --> n_view_toggle["view_toggle"]
Public surface
`account_hub`
| Item | What it is |
|---|---|
pub const THEME_STORAGE_KEY: & str | localStorage key the anti-FOUC <head> script and this component agree on |
pub type PortFuture<T>: Pin <Box <dyn Future <Output = Result <T, String>>>> | A boxed, single-threaded async result — the wire shape for AccountPort closures |
pub struct AccountProfile | Read model for GET /me/profile. |
pub struct UpdateProfile | PATCH body for /me/profile |
pub struct ChangePassword | POST body for /me/change_password. |
pub struct UpdateEmail | PATCH body for /me/email |
pub struct AccountPreferences | Read model for GET /me/preferences (UserPreferences). |
pub struct UpdatePreferences | PATCH body for /me/preferences |
pub struct LocaleOption | A selectable locale option (value = BCP-47 tag, label = endonym). |
pub struct AccountLabels | Every user-facing string the hub renders |
pub struct AccountPort | The host-supplied networking surface |
fn apply_theme(theme : & str) | Apply a theme to the document: toggles the .dark class on <html> and mirrors the choice into localStorage so the anti-FOUC <head> script re-applies it on the next load before WASM mounts |
fn AccountHub(labels : AccountLabels, port : AccountPort) -> impl IntoView | The shared My Account hub |
`admin_shell`
| Item | What it is |
|---|---|
pub struct NavLinkSpec | Serializable nav-link descriptor for registry-style or server-driven nav configuration |
NavLinkSpec :: fn new(label : impl Into <String>, path : impl Into <String>) -> Self | — |
NavLinkSpec :: fn with_icon(mut self, icon_path : impl Into <String>) -> Self | — |
NavLinkSpec :: fn with_badge(mut self, badge : i64) -> Self | — |
NavLinkSpec :: fn with_children(mut self, children : Vec <NavLinkSpec>) -> Self | — |
NavLinkSpec :: fn exact(mut self) -> Self | Mark this spec as exact-match (landing-page semantics). |
pub struct UserInfo | User identity for the <UserMenu> component. |
UserInfo :: fn new(name : impl Into <String>, email : impl Into <String>) -> Self | — |
UserInfo :: fn with_avatar(mut self, url : impl Into <String>) -> Self | — |
fn route_matches_default(current : & str, href : & str, exact : bool) -> bool | Default active-route matcher |
pub type ActiveMatcher: Rc <dyn Fn(& str, & str) -> bool> | Override predicate type for the <NavLink> predicate prop |
pub struct SidebarCtx | Shared context provided by <SidebarShell> |
fn NavLink(# prop(into) href : String, # prop(optional) exact : bool, # prop(optional) predicate : Option <ActiveMatcher>, # prop(default = None) badge : Option <Signal <Option <i64>>>, # prop(default = None) icon_path : Option <String>, # doc = " Optional view-slot icon(Sprint 0.D #30 — closes the Sprint 0.9" # doc = " Gate 1.5 R2 Q2 deferred-View-slot debt). Use for multi-path SVGs," # doc = " icon-component libraries, or any markup beyond a single d-path" # doc = " attribute. Takes precedence over icon_path when both are set." # prop(default = None) icon : Option <Callback <(), View>>, children : Children,) -> impl IntoView | Single nav link with active-state styling and optional reactive badge |
fn render_nav_link_spec(spec : NavLinkSpec) -> impl IntoView | Render a NavLinkSpec (data-layer) as a <NavLink> (UI layer) |
fn NavGroup(# prop(into) label : String, children : Children) -> impl IntoView | Optional section grouping with a label header |
fn UserMenu(user : UserInfo, # prop(into, default = "/logout" . to_string()) signout_href : String,) -> impl IntoView | Placement-neutral user menu |
fn TopBarHeader(children : ChildrenFn) -> impl IntoView | Sticky top-bar chrome |
fn UserMenuDropdown(# prop(into) user : MaybeSignal <UserInfo>, # doc = " Target for the signout link rendered as <A href=...>. **Ignored" # doc = " when on_signout is Some —** in that case the entry becomes a" # doc = " <button> and the href is unused." # prop(into, default = "/logout" . to_string()) signout_href : String, # doc = " Optional callback invoked when the \"Sign out\" entry is clicked." # doc = " If provided, renders the entry as a <button> and overrides the" # doc = " signout_href link navigation — useful for async logout flows." # doc = " Added in Sprint 0.9.R. Backward-compat: None(default)" # doc = " preserves the Sprint 0.9.5 <A href> behavior." # prop(default = None) on_signout : Option <Callback <()>>, # doc = " Extra (label, href) links rendered between the user info header and" # doc = " \"Sign out\" -- e.g. Settings/Users/Roles/Access/API Keys/Logs, for a" # doc = " consumer that keeps administrative/setup pages out of the main" # doc = " sidebar(operator, sprint 3.69: \"the control panel on the left is" # doc = " super crammed, anything administrative or setup should be hidden" # doc = " with the dropdown on my account settings\"). Empty by default --" # doc = " existing consumers render exactly as before." # prop(default = Vec::new()) menu_items : Vec <(String, String)>,) -> impl IntoView | Click-to-open user-menu dropdown for header-bar placement |
fn MobileMenuToggle() -> impl IntoView | Companion hamburger toggle for the mobile drawer |
fn SidebarShell(# prop(optional) brand : Option <ChildrenFn>, nav : ChildrenFn, # prop(optional) footer : Option <ChildrenFn>, children : Children,) -> impl IntoView | Sidebar shell — desktop sidebar + mobile slide-out drawer + main content |
`badge`
| Item | What it is |
|---|---|
pub enum BadgeVariant | Badge variant for different styles. |
fn Badge(# doc = " Badge variant" # prop(default = BadgeVariant::Default) variant : BadgeVariant, # doc = " Whether to render as a pill shape" # prop(default = false) pill : bool, # doc = " Additional CSS classes" # prop(default = "") class : & 'static str, # doc = " Badge content" children : Children,) -> impl IntoView | Badge component for displaying status or labels. |
fn DotBadge(# doc = " Badge variant" # prop(default = BadgeVariant::Default) variant : BadgeVariant, # doc = " Whether to show pulsing animation" # prop(default = false) pulse : bool, # doc = " Badge label" children : Children,) -> impl IntoView | Dot badge for simple status indicators. |
`bulk_actions`
| Item | What it is |
|---|---|
fn BulkActionBar(# doc = " Label for the selection count, e.g. \"item(s)\" or \"page(s)\" —" # doc = " the framework computes \"{N} {item_label} selected\"." # prop(into, default = "item(s)" . to_string()) item_label : String, # doc = " Consumer-supplied action affordances. Receives the current" # doc = " selection set so it can read the IDs for its mutation calls." # doc = " Typical contents: a <Button> per action, or a custom row" # doc = " of pickers + a \"Go\" button." children : ChildrenFn,) -> impl IntoView | — |
fn make_selection_ctx(selected : ReadSignal <HashSet <Uuid>>, set_selected : WriteSignal <HashSet <Uuid>>,) -> SelectionCtx | Helper to build a SelectionCtx from a page-local signal pair |
`button`
| Item | What it is |
|---|---|
pub enum ButtonVariant | Button variants for different styles. |
fn Button(# doc = " Button variant" # prop(default = ButtonVariant::Primary) variant : ButtonVariant, # doc = " Click handler" # prop(optional) on_click : Option <Callback <ev::MouseEvent>>, # doc = " Disabled state(can be a plain bool or a reactive signal)" # prop(into, default = false . into()) disabled : MaybeSignal <bool>, # doc = " Loading state(shows spinner, can be a plain bool or a reactive signal)" # prop(into, default = false . into()) loading : MaybeSignal <bool>, # doc = " Button type(button, submit, reset)" # prop(default = "button") button_type : & 'static str, # doc = " Additional CSS classes" # prop(default = "") class : & 'static str, # doc = " Optional DOM id(e.g. a stable test/automation hook). Rendered only" # doc = " when non-empty." # prop(default = "") id : & 'static str, # doc = " Button content" children : Children,) -> impl IntoView | Button component. |
fn IconButton(# doc = " Button variant" # prop(default = ButtonVariant::Ghost) variant : ButtonVariant, # doc = " Click handler" # prop(optional) on_click : Option <Callback <ev::MouseEvent>>, # doc = " Disabled state" # prop(default = false) disabled : bool, # doc = " Aria label for accessibility" label : & 'static str, # doc = " Icon content" children : Children,) -> impl IntoView | Icon button (circular, icon only). |
`completion_banner`
| Item | What it is |
|---|---|
pub struct CompletionItem | — |
CompletionItem :: fn new(label : impl Into <String>, completed : bool) -> Self | — |
fn CompletionBanner(# doc = " The full set of items the user is being asked to complete." items : Signal <Vec <CompletionItem>>, # doc = " Headline label(e.g. \"Complete your profile\")." # prop(into, default = "Complete your profile" . to_string()) title : String, # doc = " Optional href for the \"Continue setup →\" link." # prop(optional, into) continue_href : String, # doc = " Optional label for the continue link." # prop(into, default = "Continue setup →" . to_string()) continue_label : String,) -> impl IntoView | — |
`context_menu`
| Item | What it is |
|---|---|
pub enum DotColor | Color palette for dot indicators on menu actions |
DotColor :: fn bg_class(self) -> & 'static str | Tailwind background-color class for the dot. |
pub enum ContextMenuItem | — |
ContextMenuItem :: fn action(label : impl Into <String>, on_click : Callback <()>) -> Self | — |
ContextMenuItem :: fn destructive(mut self) -> Self | — |
ContextMenuItem :: fn with_icon(mut self, path : impl Into <String>) -> Self | — |
ContextMenuItem :: fn with_dot_color(mut self, color : DotColor) -> Self | Sprint 0.8: attach a colored dot indicator to an action item (renders as a small circle to the left of the icon/label). |
ContextMenuItem :: fn separator() -> Self | — |
ContextMenuItem :: fn header(label : impl Into <String>) -> Self | Sprint 0.8: uppercase section label between item groups. |
ContextMenuItem :: fn scrollable_group(items : Vec <ContextMenuItem>, max_height : impl Into <String>) -> Self | Sprint 0.8: wrap a subgroup of items in a max-height scroll container |
fn ContextMenu(# doc = " Identifies the row this menu belongs to. Used by OpenMenuCtx" # doc = " for single-open enforcement." item_id : Uuid, # doc = " Menu contents." items : Vec <ContextMenuItem>, # doc = " CSS classes for trigger positioning." # prop(optional, into) trigger_class : String,) -> impl IntoView | Three-dot trigger button + dropdown overlay |
`data_table`
| Item | What it is |
|---|---|
pub type KeyFn<T>: Rc <dyn Fn(& T) -> String> | Sprint 0.8 drive-by clippy fix (type_complexity): named alias for the stable-key extractor closure used by DataTable. |
pub struct ColumnDef<T> | Column definition for the data table. |
ColumnDef<T> :: fn new(key : impl Into <String>, header : impl Into <String>, render : impl Fn(& T) -> View + 'static,) -> Self | — |
ColumnDef<T> :: fn sortable(mut self) -> Self | — |
ColumnDef<T> :: fn width(mut self, width : impl Into <String>) -> Self | — |
pub trait Column<T> | Column trait for type-erased column handling. |
ColumnDef<T> :: fn key(& self) -> & str | — |
ColumnDef<T> :: fn header(& self) -> & str | — |
ColumnDef<T> :: fn render(& self, item : & T) -> View | — |
ColumnDef<T> :: fn sortable(& self) -> bool | — |
ColumnDef<T> :: fn width(& self) -> Option <& str> | — |
fn DataTable <T>(# doc = " Data items" items : Vec <T>, # doc = " Column definitions" columns : Vec <ColumnDef <T>>, # doc = " Whether data is loading" # prop(default = false) loading : bool, # doc = " Empty state message" # prop(default = "No items found") empty_message : & 'static str, # doc = " Row click handler" # prop(optional) on_row_click : Option <Callback <usize>>, # doc = " Key extractor for stable row identity" # prop(optional) key_fn : Option <KeyFn <T>>,) -> impl IntoView where T : Clone + 'static, | Data table component. |
`empty`
| Item | What it is |
|---|---|
fn EmptyState(# doc = " Title" title : & 'static str, # doc = " Description" # prop(optional) description : Option <& 'static str>, # doc = " Icon(SVG path)" # prop(optional) icon : Option <& 'static str>, # doc = " Action button" # prop(optional) children : Option <Children>,) -> impl IntoView | Empty state component. |
fn ErrorState(# doc = " Error title" # prop(default = "Something went wrong") title : & 'static str, # doc = " Error message" message : String, # doc = " Retry handler" # prop(optional) on_retry : Option <Callback <()>>,) -> impl IntoView | Error state component. |
`file_upload`
| Item | What it is |
|---|---|
pub struct UploadProgress | — |
fn FileUpload(# doc = " Endpoint URL for POST /api/v1/admin/media." # prop(into) upload_url : String, # doc = " CSRF cookie name(consumer's ApiClient knows this)." # prop(into) csrf_cookie_name : String, # doc = " MIME types passed to the <input accept> attribute." # prop(into, default = "image/*" . to_string()) accept : String, # doc = " Fires when one file's progress changes(loaded/total/percent)." # prop(into) on_progress : Callback <UploadProgress>, # doc = " Fires on a per-file 2xx with the parsed UploadResponse." # prop(into) on_complete : Callback <UploadResponse>, # doc = " Fires on a per-file 4xx/5xx with (filename, error_code, detail)." # prop(into) on_error : Callback <(String, String, String)>, # doc = " Allow multi-file picks(defaults to single)." # prop(default = false) multiple : bool,) -> impl IntoView | — |
`form`
| Item | What it is |
|---|---|
fn FormGroup(# doc = " Label text" # prop(into) label : String, # doc = " Field name/id" name : & 'static str, # doc = " Whether the field is required" # prop(default = false) required : bool, # doc = " Error message" # prop(optional) error : Option <String>, # doc = " Hint text" # prop(optional, into) hint : Option <String>, # doc = " Form control" children : Children,) -> impl IntoView | Form group wrapper for labels and inputs. |
fn TextInput(# doc = " Input name/id" name : & 'static str, # doc = " Input type(text, email, password, etc.)" # prop(default = "text") input_type : & 'static str, # doc = " Placeholder text" # prop(optional) placeholder : Option <& 'static str>, # doc = " Current value(controlled)" # prop(optional) value : Option <RwSignal <String>>, # doc = " Change handler(uncontrolled)" # prop(optional) on_input : Option <Callback <String>>, # doc = " Whether the field is disabled" # prop(default = false) disabled : bool, # doc = " Whether the field is readonly" # prop(default = false) readonly : bool, # doc = " Whether there's an error" # prop(default = false) has_error : bool, # doc = " Additional classes" # prop(default = "") class : & 'static str,) -> impl IntoView | Text input component. |
fn TextArea(# doc = " Input name/id" name : & 'static str, # doc = " Placeholder text" # prop(optional) placeholder : Option <& 'static str>, # doc = " Number of rows" # prop(default = 4) rows : u32, # doc = " Current value(controlled)" # prop(optional) value : Option <RwSignal <String>>, # doc = " Change handler(uncontrolled)" # prop(optional) on_input : Option <Callback <String>>, # doc = " Whether the field is disabled" # prop(default = false) disabled : bool, # doc = " Whether there's an error" # prop(default = false) has_error : bool, # doc = " Additional classes" # prop(default = "") class : & 'static str,) -> impl IntoView | Textarea component. |
pub struct SelectOption | Select option. |
SelectOption :: fn new(value : impl Into <String>, label : impl Into <String>) -> Self | — |
fn Select(# doc = " Input name/id" name : & 'static str, # doc = " Options" options : Vec <SelectOption>, # doc = " Current value(controlled)" # prop(optional) value : Option <RwSignal <String>>, # doc = " Change handler" # prop(optional) on_change : Option <Callback <String>>, # doc = " Whether the field is disabled" # prop(default = false) disabled : bool, # doc = " Placeholder option text" # prop(optional) placeholder : Option <& 'static str>, # doc = " Whether there's an error" # prop(default = false) has_error : bool,) -> impl IntoView | Select component. |
fn Checkbox(# doc = " Input name/id" name : & 'static str, # doc = " Label text" label : & 'static str, # doc = " Checked state(controlled)" # prop(optional) checked : Option <RwSignal <bool>>, # doc = " Change handler" # prop(optional) on_change : Option <Callback <bool>>, # doc = " Whether the field is disabled" # prop(default = false) disabled : bool,) -> impl IntoView | Checkbox component. |
`hierarchy_tree`
| Item | What it is |
|---|---|
pub const MAX_HIERARCHY_DEPTH: usize | Max nesting depth before the builder stops descending |
pub struct HierarchyNode<T : Clone + 'static> | Tree node carrying an arbitrary payload: T plus a display label, an id (for <For> keying + active matching), an optional count, and recursive children |
HierarchyNode<T> :: fn new(id : impl Into <String>, label : impl Into <String>, payload : T) -> Self | — |
HierarchyNode<T> :: fn with_count(mut self, count : i64) -> Self | — |
HierarchyNode<T> :: fn with_children(mut self, children : Vec <HierarchyNode <T>>) -> Self | — |
fn build_hierarchy_tree <T, IdFn, LabelFn, ParentFn, CountFn>(flat : & T, id_fn : IdFn, label_fn : LabelFn, parent_fn : ParentFn, count_fn : CountFn,) -> Vec <HierarchyNode <T>> where T : Clone + 'static, IdFn : Fn(& T) -> String, LabelFn : Fn(& T) -> String, ParentFn : Fn(& T) -> Option <String>, CountFn : Fn(& T) -> Option <i64>, | Build a tree from a flat list |
| `fn HierarchyTree <T>(nodes : Vec <HierarchyNode <T>>, # doc = " Signal pointing at the currently-active node id(for highlight)." # prop(into, default = Signal::derive(\ | \ |
`image_cropper`
| Item | What it is |
|---|---|
fn ImageCropper(# doc = " Absolute or root-relative URL to the image(typically the" # doc = " large-WebP variant of the asset)." # prop(into) src : String, # doc = " Initial focal point coordinates in [0, 1. Falls back to(0.5,"] # doc = " 0.5) when either is None." # prop(into, default = None) initial_focal_x : Option <f64>, # prop(into, default = None) initial_focal_y : Option <f64>, # doc = " Fires on every drag step with the new normalized coords." # prop(into) on_change : Callback <(f64, f64)>,) -> impl IntoView | — |
`loading`
| Item | What it is |
|---|---|
fn Spinner(# doc = " Size(sm, md, lg)" # prop(default = "md") size : & 'static str, # doc = " Color class" # prop(default = "text-blue-600") color : & 'static str,) -> impl IntoView | Spinner component. |
fn LoadingOverlay(# doc = " Whether loading is active" loading : ReadSignal <bool>, # doc = " Loading text" # prop(default = "Loading...") text : & 'static str, # doc = " Content to overlay" children : Children,) -> impl IntoView | Loading overlay component. |
fn PageLoading(# prop(default = "Loading...") text : & 'static str) -> impl IntoView | Full page loading state. |
fn Skeleton(# doc = " Width class" # prop(default = "w-full") width : & 'static str, # doc = " Height class" # prop(default = "h-4") height : & 'static str,) -> impl IntoView | Skeleton loader for content placeholders. |
fn SkeletonCard() -> impl IntoView | Skeleton card loader. |
fn SkeletonTableRow(# prop(default = 4) columns : usize) -> impl IntoView | Skeleton table row loader. |
`media`
| Item | What it is |
|---|---|
pub struct MediaItem | Generic media item for <MediaGrid> display |
MediaItem :: fn new(id : Uuid, filename : impl Into <String>, url : impl Into <String>) -> Self | — |
MediaItem :: fn with_content_type(mut self, ct : impl Into <String>) -> Self | — |
MediaItem :: fn with_size_bytes(mut self, n : i64) -> Self | — |
fn format_file_size(bytes : i64) -> String | Format bytes as human-readable file size |
fn is_image(content_type : & str) -> bool | true for image/* content types |
fn DropZone(# doc = " Fires when the user drops files OR picks files via the click input." # doc = " Both paths normalize to a FileList." # prop(into) on_files : Callback <FileList>, # doc = " Reactive uploading indicator — when true, the drop zone shows a" # doc = " spinner overlay instead of the upload prompt." # prop(into, default = MaybeSignal::Static(false)) uploading : MaybeSignal <bool>, # doc = " accept attribute passed to the file input. Defaults to images." # prop(into, default = "image/*" . to_string()) accept : String, # doc = " Help-text shown under the upload prompt." # prop(into, default = "PNG, JPG, PDF up to 10MB" . to_string()) hint : String,) -> impl IntoView | Drag-drop upload region with click-to-pick file input |
fn MediaGrid(# prop(into) items : Signal <Vec <MediaItem>>, # doc = " Optional delete action. When Some, hover overlay shows a delete" # doc = " button that calls this with the item id." # prop(default = None) on_delete : Option <Callback <Uuid>>, # doc = " Optional view action. When Some, hover overlay shows a view" # doc = " button that calls this with the item id. Consumer decides what" # doc = " view means(modal, new tab, route transition, etc.)." # prop(default = None) on_view : Option <Callback <Uuid>>,) -> impl IntoView | Thumbnail grid for MediaItems |
`media_picker`
| Item | What it is |
|---|---|
pub struct MediaPickerItem | One selectable asset in the picker grid. |
MediaPickerItem :: fn new(id : impl Into <String>, thumbnail_url : impl Into <String>, filename : impl Into <String>,) -> Self | — |
fn MediaPicker(# doc = " Whether the picker is open." open : ReadSignal <bool>, # doc = " Assets to choose from(consumer fetches/filters these)." items : Signal <Vec <MediaPickerItem>>, # doc = " Called with the chosen asset id." on_select : Callback <String>, # doc = " Called when the picker is dismissed." on_close : Callback <()>, # doc = " Optional search callback — when Some, a search box is shown and fires" # doc = " this with the query on input." # prop(default = None) on_search : Option <Callback <String>>, # doc = " Optional load-more callback — when Some, a \"Load more\" button is shown." # prop(default = None) on_load_more : Option <Callback <()>>,) -> impl IntoView | Modal grid for selecting an existing media asset. |
`modal`
| Item | What it is |
|---|---|
fn Modal(# doc = " Whether the modal is open" open : ReadSignal <bool>, # doc = " Close handler" on_close : Callback <()>, # doc = " Modal title. String, not &'static str: a translated title comes out" # doc = " of the i18n catalog at render time and cannot be a literal(staff-ui's" # doc = " no-unwrapped-literal gate would otherwise force every caller to ship an" # doc = " English title). #[prop(into) keeps title=\"Literal\" call sites"] # doc = " working unchanged." # prop(into) title : String, # doc = " Modal size" # prop(default = "md") size : & 'static str, # doc = " Whether clicking backdrop closes the modal" # prop(default = true) close_on_backdrop : bool, # doc = " Modal content" children : ChildrenFn,) -> impl IntoView | Modal component. |
fn ConfirmModal(# doc = " Whether the modal is open" open : ReadSignal <bool>, # doc = " Close handler" on_close : Callback <()>, # doc = " Confirm handler" on_confirm : Callback <()>, # doc = " Modal title — see [Modal's title for why this is a String."] # prop(into) title : String, # doc = " Confirmation message" message : String, # doc = " Confirm button text" # prop(default = "Confirm") confirm_text : & 'static str, # doc = " Cancel button text" # prop(default = "Cancel") cancel_text : & 'static str, # doc = " Whether the action is destructive" # prop(default = false) destructive : bool, # doc = " Optional DOM id for the confirm button(a stable test/automation" # doc = " hook). Rendered only when non-empty; needed when more than one" # doc = " ConfirmModal can be mounted at once(distinct ids per instance)." # prop(default = "") confirm_id : & 'static str,) -> impl IntoView | Confirmation modal. |
`pagination`
| Item | What it is |
|---|---|
fn Pagination(# doc = " Current page(1-indexed)" current_page : ReadSignal <u32>, # doc = " Total number of pages" total_pages : ReadSignal <u32>, # doc = " Page change handler" on_page_change : Callback <u32>, # doc = " Number of page buttons to show" # prop(default = 5) visible_pages : usize,) -> impl IntoView | Pagination component. |
fn PageSizeSelector(# doc = " Current page size" page_size : ReadSignal <u32>, # doc = " Page size change handler" on_change : Callback <u32>, # doc = " Available page sizes" # prop(default = vec ! [10, 25, 50, 100)] options : Vec <u32>,) -> impl IntoView | Page size selector component. |
fn PaginationInfo(# doc = " Current page(1-indexed)" current_page : ReadSignal <u32>, # doc = " Page size" page_size : ReadSignal <u32>, # doc = " Total items" total_items : ReadSignal <u32>,) -> impl IntoView | Pagination info showing "Showing X to Y of Z results". |
`photo_gallery`
| Item | What it is |
|---|---|
pub struct GalleryPhoto | Photo descriptor for <PhotoGallery> |
GalleryPhoto :: fn new(id : Uuid, url : impl Into <String>) -> Self | — |
GalleryPhoto :: fn primary(mut self) -> Self | Mark this photo as the primary (renders first; sort_primary_first will place it ahead of non-primary photos). |
fn sort_primary_first(photos : & mut GalleryPhoto) | Sort photos so any with is_primary == true come first (stable otherwise) |
fn PhotoGallery(photos : Vec <GalleryPhoto>, # doc = " Optional \"Make Primary\" callback. When Some and the thumb is not" # doc = " already first, hover overlay shows a ⬆ button that calls this with" # doc = " the photo id." # prop(default = None) on_set_primary : Option <Callback <Uuid>>, # doc = " Optional \"Delete\" callback. When Some, hover overlay shows a ✕" # doc = " button that calls this with the photo id." # prop(default = None) on_delete : Option <Callback <Uuid>>, # doc = " When true, action buttons are always visible(touch / a11y" # doc = " consumers). Default false preserves the donor's" # doc = " hover-only behavior." # prop(default = false) actions_always_visible : bool, # doc = " Optional empty-state slot. When Some, called once when photos" # doc = " is empty and the return value replaces the default placeholder" # doc = " SVG." # prop(default = None) empty_view : Option <Callback <(), View>>,) -> impl IntoView | Photo gallery with main image + thumb strip + fullscreen lightbox |
`picture`
| Item | What it is |
|---|---|
pub struct PictureSource | A WebP + JPEG source pair for a single rendered image. |
PictureSource :: fn new(webp_url : impl Into <String>, jpeg_url : impl Into <String>, alt : impl Into <String>,) -> Self | New source from a WebP URL, a JPEG fallback URL, and alt text. |
PictureSource :: fn with_dimensions(mut self, width : u32, height : u32) -> Self | Set intrinsic dimensions (renders width/height to prevent layout shift). |
fn Picture(# doc = " The WebP + JPEG source pair." source : PictureSource, # doc = " loading=\"lazy\"(default) vs \"eager\"(e.g. above-the-fold hero)." # prop(default = true) lazy : bool, # doc = " Extra classes applied to the <img>." # prop(into, optional) class : String,) -> impl IntoView | Render a <picture> with a WebP source and JPEG <img> fallback. |
`rich_text_editor`
| Item | What it is |
|---|---|
fn RichTextEditor(# doc = " Initial markdown source." # prop(into) initial : String, # doc = " Fires on every keystroke with the current markdown source." # doc = " The host page reads this in its Save handler." # prop(into) on_change : Callback <String>, # doc = " Optional server-verified body_html(fetched + passed by the" # doc = " host page via a markdown-preview endpoint). When present," # doc = " replaces the local pulldown-cmark preview and shows the" # doc = " \"verified\" badge." # prop(into, default = create_rw_signal(None)) server_preview : RwSignal <Option <String>>,) -> impl IntoView | — |
`selection`
| Item | What it is |
|---|---|
pub struct SelectionCtx | Cross-component selection context |
fn SelectionCheckbox(item_id : Uuid, # prop(optional, into) class : String) -> impl IntoView | Checkbox overlay for item selection |
fn has_selection_ctx() -> bool | Returns true if a SelectionCtx is available in the current context. |
pub struct ItemActionsCtx | Context for triggering item-list refetch from nested components. |
pub struct PendingAction | Pending destructive action waiting for user confirmation. |
pub enum ActionKind | — |
pub struct ConfirmCtx | Context for requesting confirmation of destructive actions. |
pub struct OpenMenuCtx | Single-open-menu enforcement for <ContextMenu>. |
`toast`
| Item | What it is |
|---|---|
pub enum ToastType | Toast notification type. |
pub struct ToastMessage | Toast message. |
ToastMessage :: fn new(toast_type : ToastType, title : impl Into <String>) -> Self | — |
ToastMessage :: fn with_message(mut self, message : impl Into <String>) -> Self | — |
ToastMessage :: fn with_duration(mut self, duration_ms : u64) -> Self | — |
ToastMessage :: fn success(title : impl Into <String>) -> Self | — |
ToastMessage :: fn error(title : impl Into <String>) -> Self | — |
ToastMessage :: fn warning(title : impl Into <String>) -> Self | — |
ToastMessage :: fn info(title : impl Into <String>) -> Self | — |
pub struct ToastContext | Toast context for managing toasts. |
ToastContext :: fn new() -> Self | — |
ToastContext :: fn show(& self, toast : ToastMessage) | — |
ToastContext :: fn success(& self, title : impl Into <String>) | — |
ToastContext :: fn error(& self, title : impl Into <String>) | — |
ToastContext :: fn warning(& self, title : impl Into <String>) | — |
ToastContext :: fn info(& self, title : impl Into <String>) | — |
ToastContext :: fn dismiss(& self, id : & str) | — |
ToastContext :: fn default() -> Self | — |
fn use_toasts() -> ToastContext | Hook to get toast context. |
fn ToastProvider(children : Children) -> impl IntoView | Toast provider component. |
fn Toast(toast : ToastMessage, on_dismiss : Callback <String>) -> impl IntoView | Individual toast component. |
fn ToastContainer(toasts : RwSignal <VecDeque <ToastMessage>>) -> impl IntoView | Toast container component. |
`typeahead_selector`
| Item | What it is |
|---|---|
pub const MAX_BREADCRUMB_DEPTH: usize | Max parent-chain walk depth (donor's 10) when building breadcrumbs |
pub const MAX_TYPEAHEAD_RESULTS: usize | Max number of dropdown results rendered (donor's 15) |
pub struct TypeaheadEntry | Pre-built entry for <TypeaheadHierarchySelector> |
TypeaheadEntry :: fn new(id : Uuid, label : impl Into <String>, breadcrumb : impl Into <String>) -> Self | — |
TypeaheadEntry :: fn with_badge(mut self, badge : impl Into <String>) -> Self | — |
fn build_breadcrumb_entries <T, IdFn, LabelFn, ParentFn, BadgeFn>(flat : & T, id_fn : IdFn, label_fn : LabelFn, parent_fn : ParentFn, badge_fn : BadgeFn,) -> Vec <TypeaheadEntry> where IdFn : Fn(& T) -> Uuid, LabelFn : Fn(& T) -> String, ParentFn : Fn(& T) -> Option <Uuid>, BadgeFn : Fn(& T) -> Option <String>, | Build typeahead entries from a flat list, walking parent_id chains to synthesize "Root > Mid > Leaf" breadcrumbs |
fn filter_and_rank(entries : & TypeaheadEntry, query : & str) -> Vec <TypeaheadEntry> | Filter + rank entries by query (lowercased), return top MAX_TYPEAHEAD_RESULTS |
fn TypeaheadHierarchySelector(# doc = " Reactive list of available entries(consumer fetches + builds)." # prop(into) entries : Signal <Vec <TypeaheadEntry>>, # doc = " Currently selected entry id(None = no selection)." # prop(into) selected : Signal <Option <Uuid>>, # doc = " Fires when the user selects an entry(Some(id)) or clears the" # doc = " chip(None). Consumer mirrors to its own state via this." on_select : Callback <Option <Uuid>>, # doc = " Placeholder shown in the search input when no entry is selected." # prop(into, default = "Search…" . to_string()) placeholder : String,) -> impl IntoView | Typeahead hierarchy selector — chip-or-input toggle with a ranked dropdown showing breadcrumb chains |
`view_toggle`
| Item | What it is |
|---|---|
fn load_view_mode(key : & str) -> ViewMode | Load view mode from localStorage with fallback to Cards. |
fn save_view_mode(key : & str, mode : ViewMode) | Save view mode to localStorage. |
fn ViewToggle(mode : ReadSignal <ViewMode>, set_mode : WriteSignal <ViewMode>, # prop(into) storage_key : String,) -> impl IntoView | Three-mode toggle: Cards / Thumbnails / List. |
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
ImageCropper | image_cropper::ImageCropper |
RichTextEditor | rich_text_editor::RichTextEditor |
ViewMode | foundation_view_mode::ViewMode |
{Badge,BadgeVariant,DotBadge} | badge::{Badge,BadgeVariant,DotBadge} |
{Button,ButtonVariant,IconButton} | button::{Button,ButtonVariant,IconButton} |
{Checkbox,FormGroup,Select,SelectOption,TextArea,TextInput} | form::{Checkbox,FormGroup,Select,SelectOption,TextArea,TextInput} |
{Column,ColumnDef,DataTable} | data_table::{Column,ColumnDef,DataTable} |
{CompletionBanner,CompletionItem} | completion_banner::{CompletionBanner,CompletionItem} |
{ConfirmModal,Modal} | modal::{ConfirmModal,Modal} |
{ContextMenu,ContextMenuItem,DotColor} | context_menu::{ContextMenu,ContextMenuItem,DotColor} |
{EmptyState,ErrorState} | empty::{EmptyState,ErrorState} |
{FileUpload,UploadProgress} | file_upload::{FileUpload,UploadProgress} |
{LoadingOverlay,PageLoading,Skeleton,SkeletonCard,SkeletonTableRow,Spinner} | loading::{LoadingOverlay,PageLoading,Skeleton,SkeletonCard,SkeletonTableRow,Spinner} |
{MediaPicker,MediaPickerItem} | media_picker::{MediaPicker,MediaPickerItem} |
{PageSizeSelector,Pagination,PaginationInfo} | pagination::{PageSizeSelector,Pagination,PaginationInfo} |
{Picture,PictureSource} | picture::{Picture,PictureSource} |
{apply_theme,AccountHub,AccountLabels,AccountPort,AccountPreferences,AccountProfile,ChangePassword,LocaleOption,PortFuture,UpdateEmail,UpdatePreferences,UpdateProfile,THEME_STORAGE_KEY,} | account_hub::{apply_theme,AccountHub,AccountLabels,AccountPort,AccountPreferences,AccountProfile,ChangePassword,LocaleOption,PortFuture,UpdateEmail,UpdatePreferences,UpdateProfile,THEME_STORAGE_KEY,} |
{build_breadcrumb_entries,filter_and_rank,TypeaheadEntry,TypeaheadHierarchySelector,MAX_BREADCRUMB_DEPTH,MAX_TYPEAHEAD_RESULTS,} | typeahead_selector::{build_breadcrumb_entries,filter_and_rank,TypeaheadEntry,TypeaheadHierarchySelector,MAX_BREADCRUMB_DEPTH,MAX_TYPEAHEAD_RESULTS,} |
{build_hierarchy_tree,HierarchyNode,HierarchyTree,MAX_HIERARCHY_DEPTH} | hierarchy_tree::{build_hierarchy_tree,HierarchyNode,HierarchyTree,MAX_HIERARCHY_DEPTH} |
{format_file_size,is_image,DropZone,MediaGrid,MediaItem} | media::{format_file_size,is_image,DropZone,MediaGrid,MediaItem} |
{has_selection_ctx,ActionKind,ConfirmCtx,ItemActionsCtx,OpenMenuCtx,PendingAction,SelectionCheckbox,SelectionCtx,} | selection::{has_selection_ctx,ActionKind,ConfirmCtx,ItemActionsCtx,OpenMenuCtx,PendingAction,SelectionCheckbox,SelectionCtx,} |
{load_view_mode,save_view_mode,ViewMode,ViewToggle} | view_toggle::{load_view_mode,save_view_mode,ViewMode,ViewToggle} |
{make_selection_ctx,BulkActionBar} | bulk_actions::{make_selection_ctx,BulkActionBar} |
{render_nav_link_spec,route_matches_default,ActiveMatcher,MobileMenuToggle,NavGroup,NavLink,NavLinkSpec,SidebarCtx,SidebarShell,TopBarHeader,UserInfo,UserMenu,UserMenuDropdown,} | admin_shell::{render_nav_link_spec,route_matches_default,ActiveMatcher,MobileMenuToggle,NavGroup,NavLink,NavLinkSpec,SidebarCtx,SidebarShell,TopBarHeader,UserInfo,UserMenu,UserMenuDropdown,} |
{sort_primary_first,GalleryPhoto,PhotoGallery} | photo_gallery::{sort_primary_first,GalleryPhoto,PhotoGallery} |
{use_toasts,Toast,ToastContainer,ToastContext,ToastMessage,ToastProvider,ToastType,} | toast::{use_toasts,Toast,ToastContainer,ToastContext,ToastMessage,ToastProvider,ToastType,} |
Boundary
Reaches into foundation.
Shares tier platform with 9 other crates: platform-api, platform-corpus-console, platform-customer-ui, platform-disclosure-lab, platform-dto, platform-html-components, platform-privacy-scan-api, platform-staff-ui, … (9 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | platform |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/platform/leptos-components |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_platform["platform"] --> n_foundation["foundation"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `foundation-view-mode` | foundation | no | always |
| `platform-dto` | platform | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
gloo-storage | ^0.3 | — | no | always |
gloo-timers | ^0.3 | futures | no | always |
leptos | ^0.6 | csr | no | always |
leptos_router | ^0.6 | csr | no | always |
pulldown-cmark | ^0.10 | html | no | always |
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
uuid | ^1 | v4, v7, serde, js | no | always |
wasm-bindgen | ^0.2 | — | no | always |
web-sys | ^0.3 | Window, Document, Storage, console, HtmlDocument, Request, … (30 total) | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
wasm-bindgen-test | ^0.3 | — | no | always |
Build. None.
Depended on by. 3 workspace crates.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_application_leptos_components["application-leptos-components"] -->|uses| SELF n_platform_customer_ui["platform-customer-ui"] -->|uses| SELF n_platform_staff_ui["platform-staff-ui"] -->|uses| SELF SELF["platform-leptos-components"] SELF -->|runtime| n_foundation_view_mode["foundation-view-mode"] SELF -->|runtime| n_platform_dto["platform-dto"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| cdylib | platform_leptos_components | `src/lib.rs` |
Error model
No public error type was detected: no public item declares a type named *Error, and no public signature returns one.
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
3 workspace crates depend on this one: application-leptos-components, platform-customer-ui, platform-staff-ui.
Verification
| Kind | Count |
|---|---|
| Unit tests | 69 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
account_hub | 13 | 0 | 22 |
admin_shell | 13 | 0 | 4 |
badge | 3 | 0 | 2 |
bulk_actions | 2 | 0 | 0 |
button | 3 | 0 | 3 |
completion_banner | 2 | 0 | 0 |
context_menu | 3 | 0 | 0 |
data_table | 4 | 0 | 2 |
empty | 2 | 0 | 0 |
file_upload | 2 | 0 | 1 |
form | 6 | 0 | 6 |
hierarchy_tree | 4 | 0 | 0 |
image_cropper | 1 | 0 | 1 |
loading | 6 | 0 | 1 |
media | 5 | 0 | 3 |
media_picker | 2 | 0 | 1 |
modal | 2 | 0 | 3 |
pagination | 3 | 0 | 1 |
photo_gallery | 3 | 0 | 0 |
picture | 2 | 0 | 0 |
rich_text_editor | 1 | 0 | 0 |
selection | 8 | 0 | 0 |
toast | 7 | 0 | 1 |
typeahead_selector | 6 | 0 | 0 |
view_toggle | 3 | 0 | 0 |
What the tests establish, by name:
nav_link_spec_builder_chains—src/admin_shell.rsnav_link_spec_exact_flag—src/admin_shell.rsnav_link_spec_nested_children_round_trip—src/admin_shell.rsnav_link_spec_new_sets_defaults—src/admin_shell.rsroute_matches_deep_nesting—src/admin_shell.rsroute_matches_empty_current—src/admin_shell.rsroute_matches_exact_true—src/admin_shell.rsroute_matches_handles_admin_landing_via_exact_flag—src/admin_shell.rsroute_matches_handles_query_and_fragment_stripped_upstream—src/admin_shell.rsroute_matches_rejects_false_prefix—src/admin_shell.rsroute_matches_root_exact—src/admin_shell.rsroute_matches_segment_boundary_prefix—src/admin_shell.rsuser_info_new_sets_defaults—src/admin_shell.rsuser_info_with_avatar—src/admin_shell.rsuser_menu_dropdown_accepts_user_info—src/admin_shell.rsuser_menu_dropdown_initials_match_user_menu_logic—src/admin_shell.rsaction_default_dot_color_is_none—src/context_menu.rsdot_color_maps_to_tailwind_classes—src/context_menu.rsheader_variant_constructs—src/context_menu.rsscrollable_group_holds_items—src/context_menu.rswith_dot_color_is_noop_on_non_action—src/context_menu.rswith_dot_color_sets_field_on_action—src/context_menu.rsbuild_count_none_when_count_fn_returns_none—src/hierarchy_tree.rsbuild_cycle_two_nodes_does_not_infinite_loop—src/hierarchy_tree.rsbuild_deep_nesting_within_limit—src/hierarchy_tree.rsbuild_empty_flat_returns_empty—src/hierarchy_tree.rsbuild_mixed_roots_and_orphans—src/hierarchy_tree.rsbuild_multiple_siblings_at_root—src/hierarchy_tree.rsbuild_orphan_does_not_pull_in_cyclic_subgraph—src/hierarchy_tree.rsbuild_orphan_promoted_to_root—src/hierarchy_tree.rs- _… 39 more_
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 105 | 159 |
Public modules with a //! block | 25 | 25 |
pie showData
title Public items with rustdoc
"Documented" : 105
"No rustdoc detected" : 54
Metrics
| Metric | Value |
|---|---|
| Rust source files | 26 |
| Source lines | 6626 |
| Code lines | 4833 |
| Public API items | 159 |
| Public modules | 25 |
| Tests | 69 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 12 |
| Workspace reverse dependencies | 3 |
pie showData
title Public API by kind
"constant" : 4
"enum" : 6
"function" : 63
"method" : 53
"struct" : 29
"trait" : 1
"type alias" : 3
pie showData
title Rust source composition
"Code" : 4833
"Blank or comment" : 1793
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.