Accessible tabs, underlined or as buttons.
Each AstrolContentTab is a tab: its Title (with optional Icon and Badge) goes in the list and its content in the panel. With focus on the list, the arrows, Home and End change tab and skip disabled ones.
The customer's name, email and phone.
@using Astrol.Component.Basic.Tabs <AstrolTabs @bind-ActiveTabIndex="active" AriaLabel="Customer"> <AstrolContentTab Title="General" Icon="astrol-user"> <p>Name, email and phone...</p> </AstrolContentTab> <AstrolContentTab Title="Orders" Icon="astrol-basket" Badge="3"> <p>The last orders...</p> </AstrolContentTab> <AstrolContentTab Title="Billing" Icon="astrol-credit-card" Disabled="true"> ... </AstrolContentTab></AstrolTabs> @code { private int active;}Pills shows the tabs as buttons. By default only the active panel exists; with KeepAlive the others stay hidden in the page and keep what was typed: type something, switch tab and come back.
Go back to «Notes»: the text is still there.
@* Pills: buttons instead of underline. KeepAlive: hidden tabs keep what was typed *@<AstrolTabs Pills="true" KeepAlive="true"> <AstrolContentTab Title="Notes"> <AstrolContentInput><textarea></textarea></AstrolContentInput> </AstrolContentTab> <AstrolContentTab Title="Preview">...</AstrolContentTab></AstrolTabs>AstrolTabs
AstrolContentTab
Tabs follow the order in which they are created; one that appears later (inside an @if) is added at the end.