Log In Sign Up
HomeDocsBasicDivider Space

Divider Space

Category: Basic
The divider component has similar effects to the hr tag and the oc-line component, as both can create a horizontal dividing line. We define the divider more purely—it simply separates the context and ...

Basic Usage

Insert the <oc-divider> tag between content to create a horizontal divider line. This produces the same visual effect as the native <hr> tag or <oc-line></oc-line> component.

  • Output
  • HTML
  • The United States has the world’s largest economy and plays a dominant role in international politics, defense, technology, and entertainment. It is a federal republic with a diverse population and a strong tradition of democracy and free enterprise. From Silicon Valley to Hollywood, the U.S. drives global trends in science, media, and culture. Its institutions, military reach, and entrepreneurial spirit shape much of the modern world.

    South Korea is a global leader in innovation, with major companies like Samsung and Hyundai driving its economy. It's also a cultural powerhouse thanks to the global popularity of K-pop, Korean dramas, and fashion. With a strong education system and urban infrastructure, South Korea maintains rapid development while preserving Confucian values and rich historical sites.

  •                 
                    
                

Using Labels

To add text to the divider line, you can either:

  1. Use the label attribute
  2. Place the text directly inside the tag

The divider's label text inherits its font size from the parent element by default.

  • Output
  • HTML
  • The United States has the world’s largest economy and plays a dominant role in international politics, defense, technology, and entertainment. It is a federal republic with a diverse population and a strong tradition of democracy and free enterprise. From Silicon Valley to Hollywood, the U.S. drives global trends in science, media, and culture. Its institutions, military reach, and entrepreneurial spirit shape much of the modern world.

    A divider

    South Korea is a global leader in innovation, with major companies like Samsung and Hyundai driving its economy. It's also a cultural powerhouse thanks to the global popularity of K-pop, Korean dramas, and fashion. With a strong education system and urban infrastructure, South Korea maintains rapid development while preserving Confucian values and rich historical sites.

    The United States has the world’s largest economy and plays a dominant role in international politics, defense, technology, and entertainment. It is a federal republic with a diverse population and a strong tradition of democracy and free enterprise. From Silicon Valley to Hollywood, the U.S. drives global trends in science, media, and culture. Its institutions, military reach, and entrepreneurial spirit shape much of the modern world.

    A divider

    South Korea is a global leader in innovation, with major companies like Samsung and Hyundai driving its economy. It's also a cultural powerhouse thanks to the global popularity of K-pop, Korean dramas, and fashion. With a strong education system and urban infrastructure, South Korea maintains rapid development while preserving Confucian values and rich historical sites.

  •                 
                    
                

Using Break

The break property controls vertical spacing around the divider and accepts these values:

  • xxs: 4px (0.4rem)
  • xs: 8px (0.8rem)
  • sm: 14px (1.4rem) (default)
  • md: 24px (2.4rem)
  • lg: 32px (24+8*1rem)
  • xl: 40px (24+8*2rem)
  • xxl: 48px (24+8*3rem)
  • Output
  • HTML
  • The United States has the world’s largest economy and plays a dominant role in international politics, defense, technology, and entertainment. It is a federal republic with a diverse population and a strong tradition of democracy and free enterprise. From Silicon Valley to Hollywood, the U.S. drives global trends in science, media, and culture. Its institutions, military reach, and entrepreneurial spirit shape much of the modern world.

    A divider

    South Korea is a global leader in innovation, with major companies like Samsung and Hyundai driving its economy. It's also a cultural powerhouse thanks to the global popularity of K-pop, Korean dramas, and fashion. With a strong education system and urban infrastructure, South Korea maintains rapid development while preserving Confucian values and rich historical sites.

    A divider

    South Korea is a global leader in innovation, with major companies like Samsung and Hyundai driving its economy. It's also a cultural powerhouse thanks to the global popularity of K-pop, Korean dramas, and fashion. With a strong education system and urban infrastructure, South Korea maintains rapid development while preserving Confucian values and rich historical sites.is rich in languages, religions, and traditions. Its economy is rapidly expanding, particularly in technology, space research, and pharmaceuticals. Home to both ancient monuments and a booming startup scene, India blends deep-rooted spirituality with modern ambition. Festivals like Diwali and Holi symbolize its vibrant cultural life.

    A divider

    As the world’s largest democracy and most populous nation, India is rich in languages, religions, and traditions. Its economy is rapidly expanding, particularly in technology, space research, and pharmaceuticals. Home to both ancient monuments and a booming startup scene, India blends deep-rooted spirituality with modern ambition. Festivals like Diwali and Holi symbolize its vibrant cultural life.

  •                 
                    
                

Using Font Size (fs)

The fs (font-size) property modifies the label text size when you need to override the inherited size. Available options:

  • sm: 14px(1.4rem)
  • md: 16px(1.6rem)
  • lg: 18px(1.8rem)
  • Output
  • HTML
  • The United States has the world’s largest economy and plays a dominant role in international politics, defense, technology, and entertainment. It is a federal republic with a diverse population and a strong tradition of democracy and free enterprise. From Silicon Valley to Hollywood, the U.S. drives global trends in science, media, and culture. Its institutions, military reach, and entrepreneurial spirit shape much of the modern world.

    A divider

    South Korea is a global leader in innovation, with major companies like Samsung and Hyundai driving its economy. It's also a cultural powerhouse thanks to the global popularity of K-pop, Korean dramas, and fashion. With a strong education system and urban infrastructure, South Korea maintains rapid development while preserving Confucian values and rich historical sites.

    A divider

    South Korea is a global leader in innovation, with major companies like Samsung and Hyundai driving its economy. It's also a cultural powerhouse thanks to the global popularity of K-pop, Korean dramas, and fashion. With a strong education system and urban infrastructure, South Korea maintains rapid development while preserving Confucian values and rich historical sites.is rich in languages, religions, and traditions. Its economy is rapidly expanding, particularly in technology, space research, and pharmaceuticals. Home to both ancient monuments and a booming startup scene, India blends deep-rooted spirituality with modern ambition. Festivals like Diwali and Holi symbolize its vibrant cultural life.

    A divider

    As the world’s largest democracy and most populous nation, India is rich in languages, religions, and traditions. Its economy is rapidly expanding, particularly in technology, space research, and pharmaceuticals. Home to both ancient monuments and a booming startup scene, India blends deep-rooted spirituality with modern ambition. Festivals like Diwali and Holi symbolize its vibrant cultural life.

  •                 
                    
                

Using Size

The size property simultaneously sets both break spacing and fs font size, eliminating the need to set them separately. Options:

  • sm: 14px font with 14px margins
  • md: 16px font with 32px margins
  • lg: 18px font with 40px margins
  • Output
  • HTML
  • The United States has the world’s largest economy and plays a dominant role in international politics, defense, technology, and entertainment. It is a federal republic with a diverse population and a strong tradition of democracy and free enterprise. From Silicon Valley to Hollywood, the U.S. drives global trends in science, media, and culture. Its institutions, military reach, and entrepreneurial spirit shape much of the modern world.

    A divider

    South Korea is a global leader in innovation, with major companies like Samsung and Hyundai driving its economy. It's also a cultural powerhouse thanks to the global popularity of K-pop, Korean dramas, and fashion. With a strong education system and urban infrastructure, South Korea maintains rapid development while preserving Confucian values and rich historical sites.

    A divider

    South Korea is a global leader in innovation, with major companies like Samsung and Hyundai driving its economy. It's also a cultural powerhouse thanks to the global popularity of K-pop, Korean dramas, and fashion. With a strong education system and urban infrastructure, South Korea maintains rapid development while preserving Confucian values and rich historical sites.is rich in languages, religions, and traditions. Its economy is rapidly expanding, particularly in technology, space research, and pharmaceuticals. Home to both ancient monuments and a booming startup scene, India blends deep-rooted spirituality with modern ambition. Festivals like Diwali and Holi symbolize its vibrant cultural life.

    A divider

    As the world’s largest democracy and most populous nation, India is rich in languages, religions, and traditions. Its economy is rapidly expanding, particularly in technology, space research, and pharmaceuticals. Home to both ancient monuments and a booming startup scene, India blends deep-rooted spirituality with modern ambition. Festivals like Diwali and Holi symbolize its vibrant cultural life.

  •                 
                    
                

Attributes

Name Possible Values Default Description
label - '' Divider label text
break 'xxs'/'xs'/'sm'/
'md'/'lg'/'xl'/'xxl'
'sm' Vertical spacing
fs 'sm'/'md'/'lg' '' Label font size
size 'sm'/'md'/'lg' 'sm' Combined size setting

Methods

Common component methods:

  • set: Set properties (takes key-value pairs or array)
  • reset: Reset properties (no params)
  • clear: Clear properties and values (no params)

Basic usage: CompElem.reset()

Events

Common component events:

  • connected: Component connected (no params)
  • disconnected: Component disconnected (no params)
  • adopted: Component moved (no params)
  • set: Property set (receives value)
  • cleared: Property cleared (no params)
  • reset: Property reset (no params)

Basic usage: CompElem.on('connected',()=>{console.log('connected')})

New Launch: 20% Off All Products

Unlock all examples and development resources