Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Collections

  • QuestionCard
  • Table
  • Book3D
  • ProTable
  • PricingTable
  • JsonViewer
  • EditableTable
  • List
  • Descriptions
  • RowActions
  • Tree
  • Card
  • Carousel
  • Video
  • Audio
  • BentoGrid
  • Image
  • MagicCard
  • AnimatedList
  • Marquee
  • Sortable
  • Kanban
  • DesignCanvas
  • LayerTree
  • StageDraw
  • SlideDeck
  • PresenterView
  • ComponentPicker
  • EventStream
  • QueueLane
  • DocumentSheet
  • Novel reader
  • Scheduler
  • Org classroom
  • Danmaku
  • LiveChat
  • LivePlayer
  • LogViewer
  • FileTree
  • CodeReviewThread
  • VirtualList
  • InfiniteScroll
  • LogoLoop
  • BounceCards
  • CardSwap
  • ChromaGrid
  • CircularGallery
  • DomeGallery
  • FlyingPosters
  • InfiniteMenu
  • MagicBento
  • ScrollStack
  • ProfileCard
  • TiltedCard
  • PixelCard
  • DecayCard
  • ReflectiveCard
  • Folder

Charts and Diagrams

  • Flow
  • Diagram
  • Paper
  • SequenceDiagram
  • Sankey
  • Sparkline
  • Funnel
  • Treemap
  • Gantt
  • Heatmap
  • ContributionGraph
  • Legend
  • Chart
  • WorldMap

Information

  • ImageViewer
  • LiveProductCard
  • DiffStat
  • ScoreRing
  • ScoreScale
  • Badge
  • Dot
  • StatusDot
  • Chip
  • FilterChip
  • Coupon
  • Tag
  • Annotation
  • Avatar
  • AvatarCircles
  • User
  • QRCode
  • Comment
  • RelativeTime
  • GitCommit
  • DeployStatus
  • ShieldBadge
  • AwardBadge
  • CreditCard
  • IconTile

Metrics

  • Stat
  • Statistic
  • Meter
  • Timeline
  • NumberTicker

Placeholders

  • Empty
  • Skeleton
  • Watermark

Chip

chip

Shows a compact token with semantic styling, an optional dot, and removal action.

Usage

Variation and Tone

variant (soft / solid / outline) × tone (brand / danger / neutral) combined vision.

BrandBrandBrandDangerNeutral
tsx
<>
  <Chip tone="brand">Brand</Chip>
  <Chip variant="solid" tone="brand">Brand</Chip>
  <Chip variant="outline" tone="brand">Brand</Chip>
  <Chip tone="danger">Danger</Chip>
  <Chip tone="neutral">Neutral</Chip>
</>

Preamble content

Choose one visual indicator: a dot, a startContent icon, or an avatar (priority: avatar > startContent > dot).

OnlineNewAnnAnna
tsx
<>
  <Chip dot tone="brand">Online</Chip>
  <Chip tone="brand" startContent={<Sparkles className="size-3.5" />}>New</Chip>
  <Chip tone="brand" avatar={<Avatar fallback="Ann" />}>Anna</Chip>
</>

Removable

Pass onClose to render the close (×) button. Click to trigger the callback to be removed by the caller.

ReactVue
tsx
<Chip tone="brand" onClose={() => remove(item)}>
  React
</Chip>

Disabled

isDisabled Reduce transparency, shield pointer, and close button cannot be clicked.

DisabledDisable to turn off
tsx
<>
  <Chip isDisabled>Disabled</Chip>
  <Chip isDisabled onClose={() => {}}>Disable to close</Chip>
</>

When to use

Use Chip for a category, filter, or selected token that may be removed. Use Badge for corner counts or Dot for a bare status.

Import

ts
import { Chip, chipVariants } from "@hulianui/ui"

Props

NameTypeDefaultDescription
variant"solid"|"soft"|"outline"softVisual style.
tone"brand"|"danger"|"neutral"brandSemantic tone.
size"sm"|"md"mdSize.
dotboolean-Leading status dot.
isDisabledboolean-Lowers opacity and disables pointer actions.
classNamestring-Root class.

Events

EventTypeDescription
onClose() => voidAdds and handles the close button.

Slots

SlotTypeDescription
avatarReactNodeLeading square avatar.
startContentReactNodeLeading icon when avatar is absent.
endContentReactNodeContent before close.
childrenReactNodeChip text.

Usage notes

Priority is avatar, startContent, then dot. A close button exists only with onClose; disabled chips block it too.

The close control's accessible label follows ConfigProvider: zhCN uses "\u79fb\u9664" and enUS uses “Remove”. Legacy custom locales without components.chip keep the Chinese fallback.

Related

Sparkline · ImageViewer · LiveProductCard · DiffStat · ScoreRing · Badge

Playground

Dismissible
<Chip onClose={() => {}}>Tag</Chip>
PreviousStatusDotData DisplayNextFilterChip

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Events
    • Slots
    • Usage notes
    • Related
  • Playground