Use a list into a Dropdpown to create a custom select.
<NVDropdown Label=@(_selection ?? "Make a Choice")>
<NVList Select>
@Item("Account settings")
@Item("Support")
@Item("License")
</NVList>
</NVDropdown>
@code {
private string _selection;
private void SetSelection(string value)
{
_selection = _selection == value ? null : value;
}
private RenderFragment Item(string value)
{
return @<NVListItem Stack OnClick="@(() => SetSelection(value))">
@value
@if ((_selection == value))
{
<NVIcon Name="check" TextColor="orange-500" SMall ML="auto" />
}
</NVListItem>;
}
}
<NVList Divider>
<NVListItem Stack GutterX="3">
<NVAvatar Text="Calvin Hawkins" Url="/img/avatar/women.jpg" />
<NVStackItemFlex>
<NVBlock FontWeight="medium">Calvin Hawkins</NVBlock>
<NVBlock TextColor="gray-400">calvin.hawkins@example.com</NVBlock>
</NVStackItemFlex>
<NVButton Level="2" Icon="star"> </NVButton>
</NVListItem>
<NVListItem Stack GutterX="3">
<NVAvatar Text="Kristen Ramos" Url="/img/avatar/women.jpg" />
<NVStackItemFlex>
<NVBlock FontWeight="medium">Kristen Ramos</NVBlock>
<NVBlock TextColor="gray-400">kristen.ramos@example.com</NVBlock>
</NVStackItemFlex>
<NVButton Level="2" Icon="star"> </NVButton>
</NVListItem>
<NVListItem Stack GutterX="3">
<NVAvatar Text="Kristen Ramos" Url="/img/avatar/women.jpg" />
<NVStackItemFlex>
<NVBlock FontWeight="medium">Ted Fox</NVBlock>
<NVBlock TextColor="gray-400">ted.fox@example.com</NVBlock>
</NVStackItemFlex>
<NVButton Level="2" Icon="star"> </NVButton>
</NVListItem>
</NVList>