Expand description
Chip / tag widget.
A compact rounded pill with a label + optional removable “x” (stateful when removable, mirrors alert’s dismiss); see chip.rs.
Chip / tag widget — a compact rounded “pill” holding a short label plus an
optional removable “x” affordance. A blend of
crate::widgets::badge::Badge (the coloured pill visual + [ChipKind]
colour variants) and crate::widgets::alert::Alert (the dismiss pattern:
a stateful close affordance that hides the widget on click).
When made removable (with_removable(true) or set_on_remove), the chip
mirrors the stateful pattern of crate::widgets::alert::Alert: it carries a
[ChipStateWrapper] ({ visible } + on_remove) in a [RefAny] attached to
the “x” node. Clicking “x” flips visible to false, invokes the optional
user on_remove, and hides the whole chip by setting display: none on the
container via set_css_property (mirroring alert’s live restyle). A
non-removable chip renders no “x” and carries no live callback — it is then
just a stateless styled pill (a near-clone of [Badge]).
Key types: [Chip], [ChipKind], [ChipState], [ChipOnRemove],
[ChipOnClick].
Structs§
- Chip
- A compact rounded pill holding a label plus an optional removable “x”.
- Chip
OnClick - Chip
OnClick Callback - Chip
OnRemove - Chip
OnRemove Callback - Chip
State - The visible/hidden state of a
Chip. - Chip
State Wrapper
Enums§
- Chip
Kind - The semantic colour variant of a
Chip(mirrorsbadge::BadgeKind). - Option
Chip OnClick - Option
Chip OnRemove
Statics§
- CHIP_
ON_ CLICK_ INVOKER - Process-global slot for this callback kind’s host-side invoker.
- CHIP_
ON_ REMOVE_ INVOKER - Process-global slot for this callback kind’s host-side invoker.
Functions§
- AzApp_
setChip OnClick Callback Invoker - Register the host-side invoker for this callback kind.
- AzApp_
setChip OnRemove Callback Invoker - Register the host-side invoker for this callback kind.
- AzChip
OnClick Callback_ create From Host Handle - C-ABI export wrapping
<Wrapper>::create_from_host_handle. - AzChip
OnRemove Callback_ create From Host Handle - C-ABI export wrapping
<Wrapper>::create_from_host_handle.
Type Aliases§
- AzChip
OnClick Callback Invoker - Pointer-arg variant of this callback kind’s typedef.
- AzChip
OnRemove Callback Invoker - Pointer-arg variant of this callback kind’s typedef.
- Chip
OnClick Callback Type - Callback function type invoked when the chip’s label area is clicked.
- Chip
OnRemove Callback Type - Callback function type invoked when a removable chip’s “x” is clicked.