Radix UIKeyframes
Select
Select also writes checked and unchecked on its items. Those are deliberately never matched.
Every value the manifest allows on this host, single presets and the pairs that compose. The first is what this component ships with. Both stages are the same component, so anything that changes between them is the attribute.
withoutno attribute
with easefuldata-motion="scale-fade"
host writes
data-state, data-side
easeful matches
[data-motion~="scale-fade"][data-state="closed"]
what runs
animation: motion-exit 150ms
you write
<Select.Content data-motion="scale-fade" />
Where the attribute goes
The parts this demo composes, and the value each one carries. Everything inside an animated part is that part's content, so the tree stops there.
Select.RootSelect.TriggerSelect.ValueSelect.PortalSelect.Contentdata-motion="scale-fade"
Source
"use client"
import { Select } from "radix-ui"
import type { DemoProps } from "@/components/demos/props"
export function RadixSelect({ motion }: DemoProps) {
return (
<Select.Root>
<Select.Trigger className="btn">
<Select.Value placeholder="Pick a branch" />
</Select.Trigger>
<Select.Portal>
<Select.Content className="menu" position="popper" sideOffset={10} collisionPadding={16} data-motion={motion}>
<Select.Viewport>
<Select.Item className="menu__item" value="main">
<Select.ItemText>main</Select.ItemText>
</Select.Item>
<Select.Item className="menu__item" value="next">
<Select.ItemText>next</Select.ItemText>
</Select.Item>
<Select.Item className="menu__item" value="canary">
<Select.ItemText>canary</Select.ItemText>
</Select.Item>
</Select.Viewport>
</Select.Content>
</Select.Portal>
</Select.Root>
)
}motion prop is the only difference between them.