Components
Collapsible
A trigger that shows or hides one region of content.
Ombelle · light
Collapsible
Shadow offsets and blur.
Installation
Run in a project initialized with an Ombelle preset (see Get started). The component uses the saved project preset. Run the command from your app folder; it shows the changes and asks before writing.
pnpm dlx @ombelle-ui/cli@1.1.2 add collapsibleAdds components/ui/collapsible.tsx and installs react, @radix-ui/react-collapsible, clsx, tailwind-merge, lucide-react with lifecycle scripts disabled. This is a client component.
In a liquid glass project the plan adds a notice that accessibility is not guaranteed, because text contrast depends on the background behind the glass.
Usage
example.tsx
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@/components/ui/collapsible'
export function Example(){return <Collapsible><CollapsibleTrigger>Advanced shadow</CollapsibleTrigger><CollapsibleContent><p>Offset X and Offset Y</p></CollapsibleContent></Collapsible>}API and states
- API
- Collapsible (open, defaultOpen, onOpenChange, disabled), CollapsibleTrigger, CollapsibleContent
- Minimum states
- Closed, open, focus, disabled
- Native basis
- Radix Collapsible; Base UI Collapsible in the Base UI edition
- Styles
- Stable in Ombelle, Papier, Organic, Retro futurism, minimalist, neo-brutalism and flat, light and dark. Liquid glass: stable, accessibility not guaranteed.