Expand description
Steps — port of PrimeNG 21.1.10 p-steps.
Numbered wizard steps in a row: nav.p-steps > ul.p-steps-list > li.p-steps-item with a link, a number and a label. By
default the component only displays the current step (readonly); in interactive mode a click and the keys ←/→/Home/End/Enter/
Space switch steps. The current step is driven by the owner via active_index (a value or a signal).
use leptos::prelude::*;
use prime_steps::{Steps, StepsItem};
let model = vec![StepsItem::new().label("Personal"), StepsItem::new().label("Seat"), StepsItem::new().label("Payment")];
let html = Owner::new().with(|| view! { <Steps model=model active_index=1usize /> }.to_html());
assert!(html.contains("p-steps-item-active") && html.contains("aria-current=\"step\"") && html.contains(">3<"));Structs§
- Steps
Command - Item command event.
- Steps
Item - Steps item (instead of PrimeNG’s
MenuItem, without router fields). - Steps
Props - Props for the
Stepscomponent. - StepsPt
- Pass-through parts of
Steps.
Enums§
- Click
- What a click does.
Functions§
- Steps
- Wizard step indicator.
- aria_
disabled - Link
aria-disabled: the item’sdisabledor readonly on an inactive item. - click_
outcome - Click outcome (
onItemClick): readonly or a disabled item — ignored. - is_
activation_ key EnterandSpaceact as a click.- is_
item_ disabled - The item is disabled: it has
disabled, or readonly is on and the item is not active (isItemDisabled). - item_
classes - Item classes:
p-steps-item,p-steps-item-active,p-disabled. - key_
target - The item that focus moves to on a key; at the bounds it stays the same.
None— the key does not move focus. - link_
tabindex - Link
tabindexwithout moving focus:-1for a disabled one, its own (or0) for the active one, its own (or-1) for the rest (getItemTabIndex). - root_
classes - Root classes:
p-steps p-component,p-readonly, the user class.