gov-chip
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
color | color | Style variation of the chip. | "error" | "neutral" | "primary" | "secondary" | "success" | "warning" | ButtonColors.PRIMARY |
disabled | disabled | Makes the chip component disabled. | boolean | false |
focusable | focusable | Same as original parameter | boolean | true |
href | href | Same as original parameter | string | undefined |
iconEnd | icon-end | Definition of the button icon on the left. The icon must be defined in the form "type/name". | string | undefined |
iconStart | icon-start | Definition of the button icon on the left. The icon must be defined in the form "type/name". | string | undefined |
identifier | identifier | Custom chip identifier. Otherwise, it will be generated | string | undefined |
size | size | Chip’s size. | "m" | "s" | "xs" | ChipSizes._M |
tag | tag | Used to change the HTML tag in the chip | "a" | "button" | "span" | "span" |
target | target | Same as original parameter | string | undefined |
type | type | Chip’s type | "outlined" | "solid" | undefined |
Events
Event | Description | Type |
---|---|---|
gov-click | Emitted when the button click. | CustomEvent<PointerEvent> |
Methods
geRef() => Promise<HTMLButtonElement | HTMLSpanElement | HTMLLinkElement>
Returns a clickable element instance
Returns
Type: Promise<HTMLButtonElement | HTMLSpanElement | HTMLLinkElement>
setFocus() => Promise<void>
Focus button element
Returns
Type: Promise<void>
Dependencies
Used by
Depends on
Graph
Built with StencilJS