Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Card
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Dialog
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Native Select
- Pagination
- Popover
- Progress
- Radio Group
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Get Started
@shadcn/react
@shadcn/helpers
Force UI registry
Utilities
Installation#
pnpm dlx shadcn@latest add @force-ui-ember/collapsible
Usage#
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from '@/ui/collapsible';<Collapsible>
<CollapsibleTrigger>
Can I use this in my project?
</CollapsibleTrigger>
<CollapsibleContent>
Yes. Free to use for personal and commercial projects. No attribution
required.
</CollapsibleContent>
</Collapsible>Composition#
Use the following composition to build a Collapsible:
Collapsible
├── CollapsibleTrigger
└── CollapsibleContentControlled State#
Use @open and @onOpenChange to control the state.
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from '@/ui/collapsible';
export default class Example extends Component {
@tracked open = false;
setOpen = (value: boolean) => {
this.open = value;
};
<template>
<Collapsible @open={{this.open}} @onOpenChange={{this.setOpen}}>
<CollapsibleTrigger>Toggle</CollapsibleTrigger>
<CollapsibleContent>Content</CollapsibleContent>
</Collapsible>
</template>
}Examples#
Basic#
Settings Panel#
Use a trigger button to reveal additional settings.
File Tree#
Use nested collapsibles to build a file tree.
RTL#
To enable RTL support in Force UI, see the RTL configuration guide.
API Reference#
See the Radix UI documentation for more information.
Deploy your shadcn/ui app on Vercel
Trusted by OpenAI, Sonos, Adobe, and more.
Vercel provides tools and infrastructure to deploy apps and features at scale.
Deploy to Vercel