The AssetActionTrigger
component can trigger selection, renaming, or deletion of an asset.
This component extends React.ComponentPropsWithoutRef<"button">
, meaning it accepts all native button
element props.
action
Define the action the button should trigger.
"remove"
triggers a confirmation modal to delete the asset.
"rename"
displays an input to change the asset name.
See ResourceName
for more info.
"select"
calls the onAssetSelect
function defined as a prop on the Root
component.
Type: "remove" | "rename" | "select"
Required
Because delete
is a reserved keyword in JavaScript, the delete action is named remove
to avoid conflicts.
asChild
Type: boolean
AssetActionTrigger
must be used inside an Asset
component.