Chip
import { Chip } from '@hanzo/ui'
No examples yet.
Types
export type ChipSize = 'sm' | 'md'export type ChipVariant = 'ghost' | 'soft' | 'solid'export type ChipProps = Omit<ComponentProps<typeof XStack>, 'children' | 'color'> & {
label?: ReactNode
size?: ChipSize
variant?: ChipVariant
color?: 'primary' | 'secondary'
shape?: 'square' | 'round'
weight?: 'regular' | 'medium'
/** Before the label: an avatar, an icon. Never shrinks. */
startElement?: ReactNode
/** After the label: a remove button, a count. */
endElement?: ReactNode
/** A hairline between the label and the end element. */
endElementDivider?: boolean
/** One line with an ellipsis and an overflow hint. Default true. */
truncate?: boolean
/** The hint, when it should say more than the label. */
tooltipContent?: ReactNode
/** Makes the chip a button; it lifts under the pointer. */
onPress?: () => void
/** Makes the chip a link — a record chip opens its record. */
href?: string
/** Pressable without `onPress`/`href` — when the host handles the press. */
clickable?: boolean
disabled?: boolean
children?: ReactNode
}Exports
Chiptype ChipPropstype ChipSizetype ChipVariant