Inline Citation
Preview

Inline cited text with preview-card and carousel source details.

Overview

InlineCitation connects cited text to source details. The trigger uses a compact badge, while the content can show one or more sources inside a carousel.

Usage

import {
  InlineCitation,
  InlineCitationCard,
  InlineCitationCardBody,
  InlineCitationCardTrigger,
  InlineCitationText,
} from "@tilt-legal/cubitt-components/chat-elements";

Examples

Default

Open

API Reference

InlineCitation

Inline wrapper for cited text and its preview card. Extends all HTML span props.

PropTypeDefaultDescription
childrenReact.ReactNode-Citation text and card components.
classNamestring-Additional CSS classes for the wrapper.

InlineCitationText

Text span that receives hover styling from the parent citation group. Extends all HTML span props.

PropTypeDefaultDescription
childrenReact.ReactNode-Cited inline text.
classNamestring-Additional CSS classes for the text span.

InlineCitationCard

Preview-card root for citation details. Extends PreviewCard props.

PropTypeDefaultDescription
openDelaynumber0Accepted for API parity with hover-card usage; currently rendered through PreviewCard.
closeDelaynumber0Accepted for API parity with hover-card usage; currently rendered through PreviewCard.

InlineCitationCardTrigger

Compact badge trigger for citation details. Extends Badge props.

PropTypeDefaultDescription
sourcesstring[]-Source URLs used for the default hostname and +n label. Required.
classNamestring-Additional CSS classes for the badge trigger.

InlineCitationCardBody

Preview-card content body for citation details. Extends all HTML div props.

PropTypeDefaultDescription
childrenReact.ReactNode-Citation details or carousel content.
classNamestring-Additional CSS classes for the body.

InlineCitationCarousel

Carousel wrapper that provides carousel API context to the citation carousel controls. Extends Carousel props.

PropTypeDefaultDescription
childrenReact.ReactNode-Carousel header, content, and items.
classNamestring-Additional CSS classes for the carousel.

InlineCitationCarouselContent

Citation carousel content wrapper. Extends all HTML div props and renders Cubitt CarouselContent.

PropTypeDefaultDescription
childrenReact.ReactNode-Carousel items.
classNamestring-Additional CSS classes for the content.

InlineCitationCarouselItem

Single citation carousel item. Extends all HTML div props and renders Cubitt CarouselItem.

PropTypeDefaultDescription
childrenReact.ReactNode-Source details for this carousel item.
classNamestring-Additional CSS classes for the item.

InlineCitationCarouselHeader

Header row for citation carousel controls. Extends all HTML div props.

PropTypeDefaultDescription
childrenReact.ReactNode-Previous/index/next controls.
classNamestring-Additional CSS classes for the header.

InlineCitationCarouselIndex

Carousel index display. Extends all HTML div props.

PropTypeDefaultDescription
classNamestring-Additional CSS classes for the index wrapper.

The rendered text is generated from the current carousel index and item count.

InlineCitationCarouselPrev

Previous button for the nearest InlineCitationCarousel. Extends all HTML button props.

PropTypeDefaultDescription
aria-labelstring"Previous"Accessible label. Can be overridden.
classNamestring-Additional CSS classes for the button.

InlineCitationCarouselNext

Next button for the nearest InlineCitationCarousel. Extends all HTML button props.

PropTypeDefaultDescription
aria-labelstring"Next"Accessible label. Can be overridden.
classNamestring-Additional CSS classes for the button.

InlineCitationSource

Source metadata block for a citation. Extends all HTML div props.

PropTypeDefaultDescription
titlestring-Source title.
urlstring-Source URL shown under the title.
descriptionstring-Short source summary.
childrenReact.ReactNode-Additional or replacement source content.
classNamestring-Additional CSS classes for the source wrapper.

InlineCitationQuote

Quoted source excerpt. Extends all HTML blockquote props.

PropTypeDefaultDescription
childrenReact.ReactNode-Quote content.
classNamestring-Additional CSS classes for the quote.

On this page