Divider
A divider component used to separate content.
Importing
To use the divider component, first you need to register the component inside the page. You can register the component manually by importing the register function:
ts
import { register } from "@tapsioss/web-components/divider";
register(); // Now the divider component is ready to use!ts
import { registerDivider } from "@tapsioss/web-components";
registerDivider(); // Now the divider component is ready to use!Also you can automatically register the component by importing it with the following approach:
ts
import "@tapsioss/web-components/divider/element";TIP
If you want to use all the component in your app, you can call registerAll at the root of your project.
ts
import { registerAll } from "@tapsioss/web-components";
registerAll(); // All the components are now availableIn the React package, you can easily add the component using the following code:
ts
import { Divider } from "@tapsioss/react-components";Component Usage
html
<tapsi-divider></tapsi-divider>tsx
<Divider />Properties
| Name | Attribute Name | Description | Type | Default Value |
|---|---|---|---|---|
variant | variant | The thickness of the divider. | | "thin"| "medium"| "thick" | "thin" |