shadimage
taki
uiactionssource: ok · hit

Actions

npx shadcn add "https://taki-ui.com/r/actions.json"
free

No selection tags yet — empty means no evidence, not lack of support.

Dependencies

Bundle weight · light

Registry dependencies

https://taki-ui.com/r/button.jsonhttps://taki-ui.com/r/tooltip.json

Files1 · source cached 10/14/2026, 2:54:31 PM

registry/new-york/ai-elements/actions.tsx
"use client"

import type { ComponentProps } from "react"
import { composeRenderProps } from "react-aria-components"

import { cn } from "@/lib/utils"
import { Button, type ButtonProps } from "@/registry/new-york/ui/button"
import { Tooltip, TooltipTrigger } from "@/registry/new-york/ui/tooltip"

export type ActionsProps = ComponentProps<"div">

export const Actions = ({ className, children, ...props }: ActionsProps) => (
  <div className={cn("flex items-center gap-1", className)} {...props}>
    {children}
  </div>
)

export type ActionProps = ButtonProps & {
  tooltip?: string
  label?: string
}

export const Action = ({
  tooltip,
  children,
  label,
  className,
  variant = "ghost",
  size = "sm",
  ...props
}: ActionProps) => {
  if (tooltip) {
    return (
      <TooltipTrigger>
        <Button
          className={cn(
            "text-muted-foreground hover:text-foreground relative size-9 p-1.5",
            className
          )}
          size={size}
          type="button"
          variant={variant}
          {...props}
        >
          {composeRenderProps(children, (children) => (
            <>
              {children}
              <span className="sr-only">{label || tooltip}</span>
            </>
          ))}
        </Button>
        <Tooltip>{tooltip}</Tooltip>
      </TooltipTrigger>
    )
  }

  return (
    <Button
      className={cn(
        "text-muted-foreground hover:text-foreground relative size-9 p-1.5",
        className
      )}
      size={size}
      type="button"
      variant={variant}
      {...props}
    >
      {composeRenderProps(children, (children) => (
        <>
          {children}
          <span className="sr-only">{label || tooltip}</span>
        </>
      ))}
    </Button>
  )
}

More from taki

Browse all components in this library →