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

GitCommit

git-commit

Shows a branch, short hash, commit message, and author in inline or stacked form.

Usage

Basic usage

Branch chip + short hash + commit message, inline single line typesetting.

master10577b9fix(www): ai-chat deployment station does not respond
tsx
<GitCommit
  branch="master"
  sha="10577b9aaaa"
  message="fix(www): ai-chat deployment station is not responding"
/>

Two-line typesetting

layout="stacked" The information is at the top and the reference is at the bottom. Table/list cells are just needed.

feat(www): Global routing progress barmaster·36e347f·HuHulian
tsx
<GitCommit
  layout="stacked"
  branch="master"
  sha="36e347faaa"
  message="feat(www): Global routing progress bar"
  author="Hulian"
  avatar={<Avatar>Hu</Avatar>}
/>

Clickable short hash

Pass href to make the short hash jump to commit details, shaLength controls the number of bits.

releasecb2ae42chore(release): @hulianui/ui@0.1.2hotfixf79cbb812345Hair border token
tsx
<>
  <GitCommit branch="release" sha="cb2ae42ddd0099" href="#" message="chore(release): @hulianui/ui@0.1.2" />
  <GitCommit branch="hotfix" sha="f79cbb812345" shaLength={12} message="Hair Border token" />
</>

Small size · Quote only

size="sm" Compact; omitting message only renders the branch + hash reference.

master10577b9HuHulianfeat/xabcdef0
tsx
<>
  <GitCommit size="sm" branch="master" sha="10577b9000" author="Hulian" avatar={<Avatar>Hu</Avatar>} />
  <GitCommit size="sm" branch="feat/x" sha="abcdef0123" />
</>

When to use

Use GitCommit in deployment, pull-request, or activity lists to show a branch, short SHA, message, and author. Use DiffStat or DeployStatus for build lifecycle details, or Timeline for a chronological event collection.

Import

ts
import { GitCommit, shortSha, branchTone, type BranchTone } from "@hulianui/ui"

Props

NameTypeDefaultDescription
sha*string-Full or short commit SHA, truncated to shaLength.
branchstring-Branch name shown in a leading chip.
authorstring-Author name.
hrefstring-Link destination for the short SHA.
shaLengthnumber7Displayed SHA length.
colorBranchbooleantrueAssigns a stable soft color by branch name.
layout"inline" | "stacked""inline"Single-line or two-line layout for lists and table cells.
size"sm" | "md""md"Component size.
classNamestring-Custom class name.

Slots

SlotTypeDescription
messageReactNodeSingle-line truncated commit subject; the primary row in stacked mode.
avatarReactNodeAuthor image such as <Avatar />, without a hard dependency.

Pitfalls

shortSha and branchTone are exported pure helpers for reuse and testing outside the component.

Related

Sparkline · ImageViewer · LiveProductCard · DiffStat · ScoreRing · Badge

Playground

master10577b9fix(www): ai-chat deployment station does not respondHuHulian
<GitCommit
  branch="master"
  sha={deploy.sha}
  message={deploy.message}
/>
PreviousRelativeTimeData DisplayNextDeployStatus

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Slots
    • Pitfalls
    • Related
  • Playground