A compact category or removable selection.
import { Pill } from '@vrum/ui';
<Pill
variant={"default"}
size={"md"}
selected={false}
removable={true}
onRemove={() => console.log("Remove item")}
>
{"Design"}
</Pill>Copy code| Prop | Type | Default | Description |
|---|---|---|---|
variant | "outline" | "default" | "default" | Visual appearance within the Vrum design system. |
size | "sm" | "md" | "lg" | "md" | Size of the component. |
selected | boolean | false | selected configuration. |
removable | boolean | false | removable configuration. |
onRemove | (() => void) | none | on remove configuration. |
iconLeft | React.ReactNode | none | icon left configuration. |
defaultChecked | boolean | none | default checked configuration. |
defaultValue | string | number | readonly string[] | none | Initial value for an uncontrolled component. |
autoFocus | boolean | none | auto focus configuration. |
className | string | none | Additional CSS classes. |
id | string | none | id configuration. |
style | CSSProperties | none | Inline style overrides. |
aria-invalid | boolean | "false" | "true" | "grammar" | "spelling" | none | Indicates the entered value does not conform to the format expected by the application. |
aria-label | string | none | Defines a string value that labels the current element. |
children | ReactNode | none | Content displayed inside the component. |
onFocus | FocusEventHandler<HTMLSpanElement> | none | on focus configuration. |
onBlur | FocusEventHandler<HTMLSpanElement> | none | on blur configuration. |
onChange | ChangeEventHandler<HTMLSpanElement, Element> | none | Called when the input value changes. |
onSubmit | SubmitEventHandler<HTMLSpanElement> | none | Called when the form is submitted. |
onKeyDown | KeyboardEventHandler<HTMLSpanElement> | none | on key down configuration. |
onClick | MouseEventHandler<HTMLSpanElement> | none | Called when the control is activated. |
onSelect | ReactEventHandler<HTMLSpanElement> | none | on select configuration. |