Chip

To help people enter information, make selections, filter content, or trigger actions.

  • Name@spark-ui/chip
    Version1.0.1
    LicenseMIT
    npmgithubReported IssuesReport a bug
  • Chip#

    AttributeTypeDescriptionDefault
    defaultPressedbooleanConfigures a toggleButton aria-pressed initial valuenull
    pressedbooleanConfigures a toggleButton aria-pressed valuenull
    asChildbooleanChange the component to the HTML tag or custom component of the only child.null
    onClick(event: React.MouseEvent<HTMLButtonElement, MouseEvent>, args: { pressed: boolean; value?: string | number | readonly string[]; }) => voidevent handler fired each clicking eventnull
    onClear(event?: React.MouseEvent<HTMLButtonElement>) => voidClear chip handlernull
    design"outlined" | "tinted" | "dashed"Main style of the chip. - `filled`: Chip will be plain. - `outlined`: Chip will be transparent with an outline. - `tinted`: Chip will be filled but using a lighter color scheme. - `dashed`: Chip will be transparent with an outline dashed.null
    disabledbooleanDisable the chip, preventing user interaction and adding opacity.null
    intent"main" | "support" | "basic" | "accent" | "success" | "alert" | "danger" | "info" | "neutral" | "surface"Color scheme of the chip.null