Chart
crenspire-glass-ui/chartFreeComponent
Chart components built with Recharts with optional glassy variant.
Live preview
live · rendered by the registry
Rendered by crenspire/glass-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://glass-ui.crenspire.com/r/chart.jsonSource
1"use client"23import * as React from "react"4import {5 ChartContainer as BaseChartContainer,6 ChartTooltip,7 ChartTooltipContent as BaseChartTooltipContent,8 ChartLegend,9 ChartLegendContent as BaseChartLegendContent,10} from "@/components/ui/chart"11import { cn } from "@/lib/utils"12import type { ChartConfig } from "@/components/ui/chart"1314export interface ChartContainerProps extends React.ComponentProps<typeof BaseChartContainer> {15 glow?: boolean16}1718export interface ChartTooltipContentProps extends React.ComponentProps<typeof BaseChartTooltipContent> {19 glow?: boolean20}2122export interface ChartLegendContentProps extends React.ComponentProps<typeof BaseChartLegendContent> {23 glow?: boolean24}2526/**27 * Glass UI Chart - Enhanced chart components with glassy effects28 */29export const ChartContainer = React.forwardRef<30 HTMLDivElement,31 ChartContainerProps32>(({ className, variant = "glass", glow = false, ...props }, ref) => {33 return (34 <BaseChartContainer35 ref={ref}36 variant={variant}37 className={cn(38 glow && "shadow-lg shadow-purple-500/20",39 className40 )}41 {...props}42 />43 )44})45ChartContainer.displayName = "ChartContainer"4647export const ChartTooltipContent = React.forwardRef<48 HTMLDivElement,49 ChartTooltipContentProps50>(({ className, variant = "glass", glow = false, ...props }, ref) => {51 return (52 <BaseChartTooltipContent53 ref={ref}54 variant={variant}55 className={cn(56 glow && "shadow-lg shadow-purple-500/30",57 className58 )}59 {...props}60 />61 )62})63ChartTooltipContent.displayName = "ChartTooltipContent"6465export const ChartLegendContent = React.forwardRef<66 HTMLDivElement,67 ChartLegendContentProps68>(({ className, variant = "glass", glow = false, ...props }, ref) => {69 return (70 <BaseChartLegendContent71 ref={ref}72 variant={variant}73 className={cn(74 glow && "shadow-md shadow-purple-500/20",75 className76 )}77 {...props}78 />79 )80})81ChartLegendContent.displayName = "ChartLegendContent"8283export {84 ChartTooltip,85 ChartLegend,86}8788export type { ChartConfig }89
What it pulls in
npm packages
Other registry items
Files it writes
More from crenspire/glass-ui
All 49 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | crenspire/glass-ui | Components | Free | 2 deps · 5 files | |
| Alertalert | crenspire/glass-ui | Components | Free | no deps · 5 files | |
| Alert Dialogalert-dialog | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Avataravatar | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Badgebadge | crenspire/glass-ui | Components | Free | no deps · 5 files | |
| Breadcrumbbreadcrumb | crenspire/glass-ui | Components | Free | 2 deps · 5 files | |
| Buttonbutton | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Button Groupbutton-group | crenspire/glass-ui | Components | Free | no deps · 5 files |
