Vueless Docs
ComponentsGitHubWebsite
  • Getting Started
  • Installation
    • Quick start (Vue)
    • Quick start (Nuxt)
    • Class autocompletion
    • Minimal requirements
    • Storybook docs
  • Global customization
    • General
    • Colors
    • Design system
    • Rounding
    • Focus Outline
    • Font Size
    • Disabled Opacity
    • Dark mode
    • Custom tailwind classes
  • Component customization
    • General
    • Styling
    • Unstyled mode
    • Conditional styling
    • Extends styling from keys
    • Nested components styling
    • Props defaults
    • Redefining props
    • Defining custom props
    • Internationalization (i18n)
  • Creating own components
    • Vueless file structure
    • Create new component
    • Copy existing component
  • Svg Icons
    • General usage
    • Custom icons
    • Dynamic import
    • Advanced settings
  • Helpers
    • Change settings in runtime
  • Other
    • Vueless Vite Plugins
Powered by GitBook
On this page
  1. Global customization

Focus Outline

You can set the focus outline width globally for all Vueless components.

vueless.config.{js,ts}
export default {
  outline: 4, /* default -> 2 (pixels) */
}

If you define only the outline (medium) value, small and large sizes will be automatically calculated. The expected values are listed in the table below:

small (outline.sm)
medium (outline / outline.md)
large (outline.lg)

0

0

0

0

1

2

1

2

3

2

3

4

3

4

5

4

5

6

5

6

7

If you want to use custom values for small and large outlines, you can define them manually.

vueless.config.{js,ts}
export default {
  outline: {
    sm: 2,
    md: 4,
    lg: 6,
  }
}

Custom tailwind class

To implement global focus ring stylings, Vueless provides custom Tailwind CSS classes and corresponding CSS variables. Feel free to use these classes in your components whenever you need consistent rounding across your project.

You can also use the corresponding CSS variables directly:

Custom classes
CSS variables in a utility class

outline-small

outline-(--vl-outline-sm)

outline-medium

outline-(--vl-outline)

outline-large

outline-(--vl-outline-lg)

Last updated 22 days ago