Shadwire

Search the documentation

Search the documentation and component pages by title and by content.

Get started
Introduction
Installation
shadwire.json
Theming
Dark mode
Tools
CLI
Agent skill
Registry
llms.txt
Guides
Composition
Styling
Forms
Icons
Accessibility
Localisation
Blocks
Overview
Components
Overview
Accordion
Alert
Alert Dialog
Aspect Ratio
Avatar
Badge
Breadcrumb
Button
Button Group
Calendar
Card
Carousel
Chart
Checkbox
Collapsible
Combobox
Command
Context Menu
Data Table
Date Picker
Dialog
Drawer
Dropdown Menu
Empty
Field
Hover Card
Icon
Input
Input Group
Input OTP
Item
Kbd
Label
Menubar
Native Select
Navigation Menu
Pagination
Popover
Progress
Radio Group
Resizable
Scroll Area
Select
Separator
Sheet
Sidebar
Skeleton
Slider
Sonner
Spinner
Switch
Table
Tabs
Textarea
Toggle
Toggle Group
Tooltip

Separator

Divides content, visually or semantically.

Installation

Shadwire follows shadcn/ui's open code model: the component's source is copied into your application and becomes yours. Install it with the CLI:

shadwire add separator --yes

The separator registry item installs these files:

  • app/components/ui_component.rb
  • app/components/ui/separator_component.rb
  • app/helpers/ui/separator_helper.rb
  • vendor/shadwire/shadwire.css

Haven't installed the CLI yet? gem install shadwire, then shadwire init.

Usage

Use the semantic mode by default. Pass decorative: true for purely visual dividers.

<%= ui_separator %>
<%= ui_separator(orientation: :vertical, class: "h-5") %>

Or render Ui::SeparatorComponent directly:

<%= render Ui::SeparatorComponent.new(decorative: true) %>

Examples

Orientations and decorative

Semantic separators expose aria-orientation; decorative ones stay hidden from assistive technology.

Account

Manage your email, password and preferences.

Blog Docs API
<div class="grid gap-4">
  <div>
    <p class="text-sm font-medium">Account</p>
    <p class="text-sm text-muted-foreground">Manage your email, password and preferences.</p>
  </div>
  <%= ui_separator %>
  <div class="flex h-5 items-center gap-3 text-sm">
    <span>Blog</span>

API reference

ui_separator(**options) wraps Ui::SeparatorComponent.new(**options).

Argument Type Default Description
orientationSymbol/String:horizontal:horizontal or :vertical.
decorativeBooleannilWhen true, renders role="none" and aria-hidden="true".
**attrsHash{}Free-form HTML attributes, merging data/aria.